Commit 36364425 by BellCodeEditor

save project

parent b167eb50
Showing with 4 additions and 4 deletions
...@@ -48,7 +48,7 @@ score=0 ...@@ -48,7 +48,7 @@ score=0
index = 0 index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
t = 35 t = 40
road_x = 0 road_x = 0
bg_x = 0 bg_x = 0
time = 0 time = 0
...@@ -83,13 +83,13 @@ while True: ...@@ -83,13 +83,13 @@ while True:
else: else:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 降落状态 if jumpState == "down": # 降落状态
if t <= 35: if t <= 40:
y += t y += t
wukong.rect.y = y wukong.rect.y = y
t += 2 t += 2
else: else:
jumpState = "runing" jumpState = "runing"
t = 35 t = 40
# 将背景图画上去 # 将背景图画上去
bg_x -= 1 bg_x -= 1
...@@ -125,7 +125,7 @@ while True: ...@@ -125,7 +125,7 @@ while True:
score+=sprite.score score+=sprite.score
sprite.score=0 sprite.score=0
scoreSurf=basic_font.render('分数:'+str(score),True,(255,255,255)) scoreSurf=basic_font.render('分数:'+str(score),True,(255,255,255))
score.blit(scoreSurf,(880,20)) screen.blit(scoreSurf,(880,20))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(60) FPS.tick(60)
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