Commit a3321935 by BellCodeEditor

save project

parent 971a08e4
Showing with 4 additions and 4 deletions
...@@ -46,7 +46,7 @@ basic_font=pygame.font.Font('STKAITI.TTF',17) ...@@ -46,7 +46,7 @@ basic_font=pygame.font.Font('STKAITI.TTF',17)
index = 0 index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
t = 300 t = 50
road_x = 0 road_x = 0
bg_x = 0 bg_x = 0
time = 0 time = 0
...@@ -57,7 +57,7 @@ old_score=score ...@@ -57,7 +57,7 @@ old_score=score
block_list =pygame.sprite.Group() # 创建精灵组 block_list =pygame.sprite.Group() # 创建精灵组
with open('record.txt','r',encoding='utf-8') as f: with open('record.txt','r',encoding='utf-8') as f:
content=f.read() content=f.read()
record=json.louds(content) record=json.loads(content)
one=record["第1名"] one=record["第1名"]
two=record["第2名"] two=record["第2名"]
thr=record["第3名"] thr=record["第3名"]
...@@ -87,13 +87,13 @@ while True: ...@@ -87,13 +87,13 @@ while True:
else: else:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 降落状态 if jumpState == "down": # 降落状态
if t <= 300: if t <= 50:
y += t y += t
wukong.rect.y = y wukong.rect.y = y
t += 2 t += 2
else: else:
jumpState = "runing" jumpState = "runing"
t =300 t =50
# 将背景图画上去 # 将背景图画上去
bg_x -= 1 bg_x -= 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