Commit 7f500f37 by BellCodeEditor

save project

parent 3e4e66ba
Showing with 6 additions and 5 deletions
......@@ -4,19 +4,19 @@ from pygame import locals
pygame.init()
# 创建一个窗口
screen=pygame.display.set_mode((800,600))
screen=pygame.display.set_mode((780,600))
backgroung=pygame.image.load('bg.png')
right=pygame.image.load('right.png')
left=pygame.image.load('left.png')
up=pygame.image.load('up.png')
down=pygame.image.load('down.png')
apple=pygame.image.load('apple.png')
food=pygame.image.load('apple.png')
body=pygame.image.load('body.png')
while True:
for event in pygame.event.get():
if event.type==12:
if event.type==locals.QUIT:
exit()
screen.blit(backgroung,(0,0))
......@@ -24,4 +24,6 @@ while True:
screen.blit(body,(90,90))
screen.blit(body,(90,60))
screen.blit(body,(90,30))
\ No newline at end of file
screen.blit(food,(750,570))
pygame.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