Commit 29b140eb by BellCodeEditor

auto save

parent 583ba438
Showing with 4 additions and 1 deletions
...@@ -22,6 +22,7 @@ for i in range(20): ...@@ -22,6 +22,7 @@ for i in range(20):
index = 0 index = 0
y=400 y=400
jumpState='running' jumpState='running'
t=0
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:
...@@ -47,7 +48,8 @@ while True: ...@@ -47,7 +48,8 @@ while True:
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
screen.blit(road, (0, 500)) screen.blit(road, (0, 500))
screen.blit(wukong[index], (150,y)) screen.blit(wukong[index], (150,y))
index+=1 if jumpState=='running':
index+=1
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(60) FPS.tick(60)
\ 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