Commit 37648294 by BellCodeEditor

save project

parent c066a5a4
Showing with 7 additions and 4 deletions
...@@ -78,6 +78,9 @@ while True: ...@@ -78,6 +78,9 @@ while True:
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
jumpState = "up" jumpState = "up"
if event.type == locals.MOUSEBUTTONDOWN:
mouse_x,mouse_y=event.pos
speed = 8+score//3 speed = 8+score//3
# 悟空造型 # 悟空造型
...@@ -92,14 +95,14 @@ while True: ...@@ -92,14 +95,14 @@ while True:
if t > 0: if t > 0:
y -= t y -= t
wukong.rect.y = y wukong.rect.y = y
t -= 2.3 t -= 1.7
else: else:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 降落状态 if jumpState == "down": # 降落状态
if t <= 30: if t <= 30:
y += t y += t
wukong.rect.y = y wukong.rect.y = y
t += 2.3 t += 1.7
else: else:
jumpState = "runing" jumpState = "runing"
t =30 t =30
......
{"第1名": 4, "第2名": 2, "第3名": 1} {"第1名": 46, "第2名": 35, "第3名": 16}
\ No newline at end of file \ No newline at end of file
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