Commit dc6db891 by BellCodeEditor

save project

parent 727e6f74
Showing with 5 additions and 4 deletions
......@@ -42,7 +42,7 @@ bg_x=0
index = 0
y = 400
jumpState = "runing"
t = 30
t = 40
time=0 #精灵之间的间隔时间
#创建一个障碍物对象
#obstacle = Block(stone,cacti,bush)
......@@ -80,13 +80,14 @@ while True:
else:
jumpState = "down"
if jumpState == "down": # 降落状态
if t <= 30:
if t <= 40:
y += t
wukong.rect.y=y
t += 2
else:
jumpState = "runing"
t =30
t =40
wukong.rect.x=150
# 将背景图画上去
bg_x-=1
if bg_x<-1000:
......@@ -96,7 +97,7 @@ while True:
if road_x<-1000:
road_x=0
screen.blit(road, (road_x, 500)) # 路
screen.blit(wukong.image, (150, wukong.rect.y)) # 悟空
screen.blit(wukong.image, (wukong.rect.x, wukong.rect.y)) # 悟空
# if obstacle.rect.x <= 0-obstacle.rect.width: # 障碍物消失
# # 创建障碍物对象
# obstacle = Block(stone,cacti,bush)
......
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