Commit ed06cb7e by BellCodeEditor

save project

parent e2c9c162
Showing with 4 additions and 1 deletions
...@@ -20,6 +20,7 @@ jump = 'run' ...@@ -20,6 +20,7 @@ jump = 'run'
index = 0 index = 0
y = 400 y = 400
t = 20 t = 20
k = 1
pygame.display.set_caption('帅B跑酷') pygame.display.set_caption('帅B跑酷')
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -28,8 +29,9 @@ while True: ...@@ -28,8 +29,9 @@ while True:
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
if t == 20: if k = 1:
jump = 'up' jump = 'up'
k = 0
...@@ -46,6 +48,7 @@ while True: ...@@ -46,6 +48,7 @@ while True:
else: else:
jump = 'run' jump = 'run'
t = 20 t = 20
k = 1
wukong=hero[index] wukong=hero[index]
if jump == 'run': if jump == 'run':
index += 1 index += 1
......
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