Commit 5ad3123f by BellCodeEditor

save project

parent d1378544
Showing with 3 additions and 3 deletions
...@@ -42,7 +42,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -42,7 +42,7 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero4.png'), pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')] pygame.image.load('hero5.png')]
basic_font = pygame.font.Font('STKAITI.TTF',32) basic_font = pygame.font.Font('STKAITI.TTF',32)
score_audio=pygame.mixer.Sound score_audio=pygame.mixer.Sound('score.wav')
index = 0 index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
...@@ -76,14 +76,14 @@ while True: ...@@ -76,14 +76,14 @@ while True:
if t > 0: if t > 0:
y -= t y -= t
wukong.rect.y = y wukong.rect.y = y
t -= 1 t -= 1.5
else: else:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 降落状态 if jumpState == "down": # 降落状态
if t <= 30: if t <= 30:
y += t y += t
wukong.rect.y = y wukong.rect.y = y
t += 1 t += 1.5
else: else:
jumpState = "runing" jumpState = "runing"
t =30 t =30
......
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