Commit f9815319 by BellCodeEditor

auto save

parent ba2ed463
Showing with 7 additions and 6 deletions
...@@ -60,7 +60,7 @@ while True: ...@@ -60,7 +60,7 @@ while True:
else: else:
jumpState = "runing" jumpState = "runing"
t =30 t =30
# 悟空造型 # 悟空造型
wukong = hero[index] wukong = hero[index]
if jumpState == "runing": # 跑步状态下 if jumpState == "runing": # 跑步状态下
...@@ -79,18 +79,19 @@ while True: ...@@ -79,18 +79,19 @@ while True:
lu_x=0 lu_x=0
screen.blit(road, (lu_x, 500)) # 路 screen.blit(road, (lu_x, 500)) # 路
screen.blit(wukong, (150, y)) # 悟空 screen.blit(wukong, (150, y)) # 悟空
aa=Block(bush,cacti,stone)
if q>30: if q>30:
q=0 q=0
w=random.randint(0,50) w=random.randint(0,50)
if w<=20: # if w<=20:
s.add(aa) #
# s.add(aa)
if aa.rect.x <= 0-aa.rect.width: if aa.rect.x <= 0-aa.rect.width:
aa.kill() # 障碍物消失 aa.kill() # 障碍物消失
aa=Block(bush,cacti,stone)
aa.rect.x -= 8 aa.rect.x -= 8
screen.blit(aa.image, (aa.rect.x, aa.rect.y)) screen.blit(aa.image, (aa.rect.x, aa.rect.y))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
......
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