Commit 5259196e by BellCodeEditor

save project

parent d888ed59
Showing with 3 additions and 3 deletions
...@@ -18,7 +18,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -18,7 +18,7 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero5.png')] pygame.image.load('hero5.png')]
index = 0 index = 0
y = 400 y = 400
jump1="runing" jump1 = "runing"
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:
...@@ -27,12 +27,12 @@ while True: ...@@ -27,12 +27,12 @@ while True:
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
jump1 = "up" jump1 = "up"
if jump1="up": if jump1 == "up":
if y>150: if y>150:
y -= 5 y -= 5
else: else:
jump1="down" jump1="down"
if jump1 = "down": if jump1 == "down":
if y<400: if y<400:
y+=5 y+=5
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