Commit 28260230 by BellCodeEditor

auto save

parent 205883cb
Showing with 3 additions and 1 deletions
...@@ -31,6 +31,7 @@ index = 0 ...@@ -31,6 +31,7 @@ index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
t = 30 t = 30
a = 10
aa=Block(bush,cacti,stone) aa=Block(bush,cacti,stone)
while True: while True:
...@@ -77,7 +78,8 @@ while True: ...@@ -77,7 +78,8 @@ while True:
if aa.rect.x <= 0-aa.rect.width: # 障碍物消失 if aa.rect.x <= 0-aa.rect.width: # 障碍物消失
# 创建障碍物对象 # 创建障碍物对象
aa=Block(bush,cacti,stone) aa=Block(bush,cacti,stone)
aa.rect.x -= 8 a = random.randint(5,30)
aa.rect.x -= a
screen.blit(aa.image, (aa.rect.x, aa.rect.y)) screen.blit(aa.image, (aa.rect.x, aa.rect.y))
......
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