Commit 06b68183 by BellCodeEditor

save project

parent e503b61a
Showing with 8 additions and 9 deletions
......@@ -6,22 +6,21 @@ background=pygame.image.load("bg.png")
right=pygame.image.load("right.png")
apple=pygame.image.load("apple.png")
body=pygame.image.load("body.png")
left=pygame.image.load("left.png")
up=pygame.image.load("up.png")
down=pygame.image.load("down.png")
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
x,y=240,120
FPSCLOCK=pygame.time.Clock()
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
x+=30
screen.blit(background,(0,0))
screen.blit(right,(240,120))
screen.blit(up,(60,390))
screen.blit(left,(90,390))
screen.blit(down,(120,390))
screen.blit(right,(x,y))
screen.blit(apple,(360,300))
screen.blit(body,(210,120))
screen.blit(body,(210,90))
screen.blit(body,(180,90))
pygame.display.update()
\ No newline at end of file
pygame.display.update()
FPSCLOCK.tick(3)
\ 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