Commit 58352221 by BellCodeEditor

save project

parent 611e2b24
Showing with 17 additions and 4 deletions
...@@ -3,11 +3,23 @@ from pygame import locals ...@@ -3,11 +3,23 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
background=pygame.image.load('bg.png')
apple=pygame.image.load('apple.png')
right=pygame.image.load('right.png')
body=pygame.image.load('body.png')
body=pygame.image.load('body.png')
body=pygame.image.load('body.png')
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((1000,1000)) screen=pygame.display.set_mode((800,600))
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if : if event.type==locals.QUIT:
exit()
screen.blit(background,(0,0))
screen.blit(apple,(360,360))
screen.blit(right,(120,390))
screen.blit(body,(90,390))
screen.blit(body,(60,390))
screen.blit(body,(60,420))
pygame.display.update()
\ No newline at end of file
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