Commit 92c7bc5a by BellCodeEditor

save project

parent 0d4cc6e1
Showing with 4 additions and 2 deletions
......@@ -25,10 +25,11 @@ while True:
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
if event.type==locals.KEYDOWN:
if jump=="running":
if event.key==locals.K_SPACE:
jump="UP"
if jump=="UP":
if t>0:
y-=t
......@@ -36,7 +37,7 @@ while True:
else:
jump="down"
if jump=="down":
if t<30:
if t<=30:
y+=t
t+=2
else:
......@@ -45,6 +46,7 @@ while True:
# 将背景图画上去
screen.blit(background, (0, 0))
screen.blit(road, (0, 500))
if jump=="running":
Q+=1
if Q>4:
Q=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