Commit b4fe0941 by BellCodeEditor

save project

parent 6e9ee2c4
Showing with 17 additions and 2 deletions
......@@ -88,14 +88,14 @@ while True:
if t > 0:
y -= t
wukong.rect.y = y
t -= 2
t -= 0.1
else:
jumpState = "down"
if jumpState == "down": # 降落状态
if t <= 30:
y += t
wukong.rect.y = y
t += 2
t += 0.1
else:
jumpState = "runing"
t = 30
......@@ -133,6 +133,21 @@ while True:
if (sprite.rect.x + sprite.rect.width) < wukong.rect.x:
score += sprite.score
sprite.score = 0
if score>three:
if score>one:
record['第1名']=score
record['第2名']=one
record['第3名']=two
elif:
record['第2名']=score
record['第3名']=two
else:
record['第3名']=score
record=json.dumps(record,ensure_ascii=False)
with open('record.txt','w',encoding='utf-8')as f:
f.weite(record)
if score > old_score:
score_audio.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