Commit 00ecea67 by BellCodeEditor

save project

parent f78fc7ca
Showing with 17 additions and 3 deletions
......@@ -84,7 +84,7 @@ while True:
if nu > 0:
y -= nu
wukong.rect.y = y
nu -=2
nu -=1.2#shi2,2,2,2,2,2!!!!!!!!!!!
else:
zhuangtai = "down"
......@@ -92,7 +92,7 @@ while True:
if nu <= 30:
y += nu
wukong.rect.y = y
nu += 2
nu += 1.2 #shi2,2,2,2,2,2!!!!!!!!!!!
else:
zhuangtai = "running"
nu = 30
......@@ -126,11 +126,25 @@ while True:
gameover = pygame.image.load('gameover.png')
screen.blit(gameover,(400,200))
huabu = False
if score > three:
if score > one:
record["第1名"] = score
record["第2名"] = one
record["第3名"] = two
elif score > two:
record["第2名"] = score
record["第3名"] = two
else:
record["第3名"] = score
jsonzfc = json.dumps(record,ensure_uscii = False)
with open("score.txt","w",encoding='utf-8') as f:
f.write(jsonzfc)
else:
if (prop.rect.x + prop.rect.width) < wukong.rect.x :
score += prop.score
prop.score = 0
if score > old_score:
luodi.play()
old_score = score
......
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