Commit 53991ee0 by BellCodeEditor

save project

parent 929b0b6a
Showing with 8 additions and 2 deletions
......@@ -38,6 +38,7 @@ rect.y = 500 - rect.height
rx=0
bx=0
time=0
num=0
while True:
for event in pygame.event.get():
......@@ -81,8 +82,13 @@ while True:
screen.blit(road, (rx, 500)) # 路
screen.blit(wukong, (150, y)) # 悟空
blode=Block(stone,cacti,bush)
block_list.add(blode)
time+=1
if time>=20:
time=0
num=random.randint(0,50)
if num>10:
blode=Block(stone,cacti,bush)
block_list.add(blode)
for i in block_list:
# 障碍物消失
i.rect.x -= 8
......
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