Commit 2589dcfe by BellCodeEditor

save project

parent bfc36784
Showing with 3 additions and 0 deletions
...@@ -24,6 +24,7 @@ while True: ...@@ -24,6 +24,7 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if jump=="run":
if event.type==locals.KEYDOWN: if event.type==locals.KEYDOWN:
if event.key==locals.K_SPACE: if event.key==locals.K_SPACE:
jump="up" jump="up"
...@@ -46,6 +47,7 @@ while True: ...@@ -46,6 +47,7 @@ while True:
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(100) FPS.tick(100)
if jump=="run":
index+=1 index+=1
if index>4: if index>4:
index=0 index=0
\ 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