Commit f8a18c3a by BellCodeEditor

auto save

parent f336371f
Showing with 5 additions and 11 deletions
......@@ -13,7 +13,7 @@ cacti = pygame.image.load('cacti.png') # 仙人掌
apple = pygame.image.load('bush.png') # 灌木丛
hero = [pygame.image.load('hero1.png'),pygame.image.load('hero2.png'),pygame.image.load('hero3.png'),pygame.image.load('hero4.png'),pygame.image.load('hero5.png')]
index = 0
QE='run'
jump='runing'
y=400
while True:
for event in pygame.event.get():
......@@ -22,19 +22,13 @@ while True:
exit()
if event.type == locals.KEYDOWN:
if event.type == locals.K_SPACE:
QE='up'
if QE=='up':
jump="up"
QE='UP'
if jump=="up":
if y>150:
y-=5
else:
QE='down'
if QE=='down':
if y>400:
y+=5
else:
QE='run'
jump="down"
lk=hero[index]
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