Commit 826de6e4 by BellCodeEditor

auto save

parent 184a06da
Showing with 3 additions and 7 deletions
......@@ -40,8 +40,8 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero3.png'),
pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')]
my.font=pygame.font.Font("")
score_
#my.font=pygame.font.Font("STKAITI.TTF")
index = 0
y = 400
jumpState = "runing"
......@@ -69,7 +69,6 @@ while True:
if jumpState == "runing":
if event.key == locals.K_SPACE:
jumpState = "up"
speed=8//
# 悟空造型
wukong = Player(hero[index])
if jumpState == "runing": # 跑步状态下
......@@ -137,10 +136,7 @@ while True:
with open("record.txt","w",encoding="utf-8") as file:
file.write(record)
else:
if sprite.rect.x+sprite.rect.width<wukong.rect.x:
score+=sprite.score
sprite.score=0
if score>old.score:
score_sound.play()
......
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