Commit 1fef7aad by BellCodeEditor

auto save

parent b14097c0
Showing with 4 additions and 3 deletions
...@@ -19,7 +19,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -19,7 +19,7 @@ hero = [pygame.image.load('hero1.png'),
index = 0 index = 0
y=400 y=400
JumpStape='running' JumpStape='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:
...@@ -29,8 +29,9 @@ while True: ...@@ -29,8 +29,9 @@ while True:
if event.key==locals.K_SPACE: if event.key==locals.K_SPACE:
JumpStape='up' JumpStape='up'
if JumpStape == 'up': if JumpStape == 'up':
if y>150: if t>0:
y-=5 y-=t
else: else:
JumpStape='down' JumpStape='down'
if JumpStape=='down': if JumpStape=='down':
......
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