Commit 64de1016 by BellCodeEditor

save project

parent bf85e085
Showing with 3 additions and 3 deletions
...@@ -25,7 +25,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -25,7 +25,7 @@ hero = [pygame.image.load('hero1.png'),
index = 0 index = 0
n=0 n=0
y=400 y=400
m=20 m=25
wkState="running" wkState="running"
#主程序 #主程序
...@@ -39,7 +39,7 @@ while True: ...@@ -39,7 +39,7 @@ while True:
#悟空跳跃 #悟空跳跃
if event.type==locals.KEYDOWN: if event.type==locals.KEYDOWN:
if event.key==locals.K_SPACE and wkState=="running": if event.key==locals.K_SPACE and wkState=="running":
m=20 m=25
wkState="up" wkState="up"
if wkState=="up": if wkState=="up":
if m>0: if m>0:
...@@ -48,7 +48,7 @@ while True: ...@@ -48,7 +48,7 @@ while True:
else: else:
wkState="down" wkState="down"
if wkState=="down": if wkState=="down":
if m<=20: if m<=25:
y+=m y+=m
m+=1 m+=1
else: else:
......
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