Commit 6ca80081 by BellCodeEditor

auto save

parent 61744d8d
Showing with 19 additions and 2 deletions
...@@ -26,4 +26,21 @@ while True: ...@@ -26,4 +26,21 @@ while True:
screen.blit(hero, (150, 400)) screen.blit(hero, (150, 400))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(60) FPS.tick(60)
\ No newline at end of file if event.type==locals
if jumpState == "up":
if t > 0:
y -=t
t-=2
else:
jumpState="down"
if jumpState == "down":
if t <= 30:
y +=t
t +=2
else:
jumpState = "runing"
t =30
\ 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