Commit ea8ca038 by BellCodeEditor

auto save

parent 99910910
Showing with 13 additions and 6 deletions
......@@ -18,6 +18,7 @@ pygame.image.load("hero4.png"),
pygame.image.load("hero5.png")]
index = 0
y = 400
t=30
rupdown = 0
while True:
for event in pygame.event.get():
......@@ -27,14 +28,20 @@ while True:
if event.type==locals.KEYDOWN:
if event.key == locals.K_SPACE:
rupdown=1
if rupdown==1:
y-=5
if y < 150:
rupdown=2
if t>0:
y-=t
t-=2
else:
rupdown =2
if rupdown==2:
y+=5
if y>400:
rupdown=0
if t<=30:
y+=t
t+=2
else:
rupdown=0
t=30
wukong = hero[index]
index+=1
if index>4:
......
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