Commit b2e27d64 by BellCodeEditor

save project

parent c996bf3e
Showing with 6 additions and 6 deletions
......@@ -36,7 +36,7 @@ hero = [pygame.image.load('hero1.png'),
index = 0
y = 400
jumpState = "runing"
t = 30
t = 40
block_list = pygame.sprite.Group()
time = 0
road_x = 0
......@@ -60,15 +60,15 @@ while True:
else:
jumpState = "down"
if jumpState == "down": # 降落状态
if t <= 30:
if t <= 40:
wukong.rect.y += t
t += 2
else:
jumpState = "runing"
t =30
t =40
if gameState == True:
# 悟空造型
` wukong.image = hero[index]
wukong.image = hero[index]
if jumpState == "runing": # 跑步状态下
index += 1
if index >= 5:
......@@ -101,4 +101,4 @@ while True:
screen.blit(gameOver,(400,200))
gameState = False
pygame.display.update()
FPS.tick(60)`
\ No newline at end of file
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