Commit 895caccc by BellCodeEditor

save project

parent 2503ba61
Showing with 9 additions and 9 deletions
......@@ -30,7 +30,7 @@ shan_x=0
index = 0
y = 400
jumpState = "runing"
t = 60
t = 40
time=0
bl=pygame.sprite.Group()
while True:
......@@ -46,29 +46,29 @@ while True:
if jumpState == "up": # 起跳状态
if t > 0:
y -= t
t -= 5
t -= 2
else:
jumpState = "down"
if jumpState == "down": # 降落状态
if t <= 60:
if t <= 40:
y += t
t += 5
t += 2
else:
jumpState = "runing"
t =60
t =40
# 悟空造型
wukong = hero[index]
if jumpState == "runing": # 跑步状态下
index += 1
if index >= 5:
if index >= 2:
index = 0
# 将背景图画上去
shan_x -=8
shan_x -=1
if shan_x <-1000:
shan_x=0
screen.blit(background, (shan_x, 0)) # 远处背景
lu_x -=1
lu_x -=8
if lu_x <-1000:
lu_x=0
screen.blit(road, (lu_x, 500)) # 路
......@@ -82,7 +82,7 @@ while True:
bl.add(aa)
for i in bl:
i.rect.x -=8
screen.blit(aa.image, (i.rect.x, i.rect.y))
screen.blit(i.image, (i.rect.x, i.rect.y))
if i.rect.x <= 0-i.rect.width:
i.kill()
......
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