Commit 749725d2 by BellCodeEditor

save project

parent 92c2e320
Showing with 8 additions and 4 deletions
...@@ -21,6 +21,7 @@ index = 0 ...@@ -21,6 +21,7 @@ index = 0
k = 0 k = 0
y = 400 y = 400
jumpsteat = "running" jumpsteat = "running"
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,15 +31,18 @@ while True: ...@@ -30,15 +31,18 @@ while True:
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
jumpsteat = "up" jumpsteat = "up"
if jumpsteat == "up": if jumpsteat == "up":
if y > 150: if y > 0:
y -= 5 y -= t
t -= 2
else: else:
jumpsteat = "down" jumpsteat = "down"
if jumpsteat == "down": if jumpsteat == "down":
if y< 400: if y <= 30:
y += 5 y += t
t+=2
else: else:
jumpsteat = "running" jumpsteat = "running"
t=30
wukong = hero[k] wukong = hero[k]
k += 1 k += 1
if k>4: if k>4:
......
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