Commit ba38d77a by BellCodeEditor

auto save

parent d33e5043
Showing with 7 additions and 4 deletions
...@@ -15,8 +15,7 @@ x,y = 240,120 ...@@ -15,8 +15,7 @@ x,y = 240,120
position = [(180,90),(180,120),(210,120),(x,y)] position = [(180,90),(180,120),(210,120),(x,y)]
setheading = "right"
snake_head = right
#载入图片 #载入图片
background = pygame.image.load('bg.png') background = pygame.image.load('bg.png')
...@@ -27,6 +26,10 @@ up = pygame.image.load('up.png') ...@@ -27,6 +26,10 @@ up = pygame.image.load('up.png')
down = pygame.image.load('down.png') down = pygame.image.load('down.png')
left = pygame.image.load('left.png') left = pygame.image.load('left.png')
setheading = "right"
snake_head = right
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:
...@@ -81,4 +84,4 @@ while True: ...@@ -81,4 +84,4 @@ while True:
#刷新画面 #刷新画面
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(3) FPSCLOCK.tick(4)
\ No newline at end of file \ 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