Commit 53991ee0 by BellCodeEditor

save project

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