Commit 66680eac by BellCodeEditor

auto save

parent 6be90027
Showing with 3 additions and 5 deletions
...@@ -20,7 +20,6 @@ index = 0 ...@@ -20,7 +20,6 @@ index = 0
y = 400 y = 400
jumpstate='running' jumpstate='running'
pygame.display.set_caption('悟空酷跑') pygame.display.set_caption('悟空酷跑')
t=30
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -30,13 +29,12 @@ while True: ...@@ -30,13 +29,12 @@ while True:
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
jumpstate="up" jumpstate="up"
if jumpstate=="up": if jumpstate=="up":
if t>0: if y>150:
y+=t y-=5
t-=2
else: else:
jumpstate="diomn" jumpstate="diomn"
if jumpstate=="diomn": if jumpstate=="diomn":
if t<400: if y<400:
y+=5 y+=5
else: else:
jumpstate="running" jumpstate="running"
......
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