Commit 000e47e8 by BellCodeEditor

save project

parent 03911160
Showing with 10 additions and 5 deletions
...@@ -18,8 +18,9 @@ hero = [pygame.image.load('hero1.png'), ...@@ -18,8 +18,9 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero4.png'), pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')] pygame.image.load('hero5.png')]
index = 0 index = 0
y=400 y=360
q=1 q=1
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:
...@@ -32,15 +33,19 @@ while True: ...@@ -32,15 +33,19 @@ while True:
else: else:
q = 2 q = 2
if q == 2: if q == 2:
if y > 100: if t >= 0:
y-=30 y-=t
t-=5
else: else:
q=3 q=3
if q == 3: if q == 3:
if y < 400: if t <= 30:
y+=2 y+=t
t+=5
else: else:
q=1 q=1
y+=40
a=hero[index] a=hero[index]
index += 1 index += 1
if index ==5: if index ==5:
......
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