Commit 5cc73a1e by BellCodeEditor

save project

parent c3f422ef
Showing with 13 additions and 3 deletions
...@@ -6,11 +6,21 @@ from pygame import locals ...@@ -6,11 +6,21 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
bg = image.load('bg.png')
# 创建一个窗口 apple = image.load('apple.png')
screen = pygame.display.set_mode((800,660)) right = image.load('right.png')
body = image.load('body.png')
screen = display.set_mode((780,600))
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
screen.blit(bg,(0,0))
screen.blit(right,(360,210))
screen.blit(apple,(360,320))
screen.blit(body,(330,210))
screen.blit(body,(300,210))
screen.blit(body,(270,210))
display.update()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment