Commit 2589dcfe by BellCodeEditor

save project

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