Commit 2efc228f by BellCodeEditor

auto save

parent e0308f6e
Showing with 8 additions and 6 deletions
...@@ -33,22 +33,24 @@ while True: ...@@ -33,22 +33,24 @@ while True:
jumpState = "up" jumpState = "up"
if jumpState == "up": # 起跳 if jumpState == "up": # 起跳
if t>0: if t>0:
t-=2
y-=t y-=t
t-=2
else: else:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 起跳 if jumpState == "down": # 起跳
if t<=30: if t<=30:
t+=2
y+=t y+=t
t+=2
else: else:
jumpState = "runing" jumpState = "runing"
t=30
wukong = hero[index] wukong = hero[index]
index += 1 if jumpState == "runing":
if index == 5: index += 1
index = 0 if index == 5:
index = 0
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
......
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