Commit b891f8d5 by BellCodeEditor

auto save

parent 99ca42ae
Showing with 1 additions and 11 deletions
...@@ -31,10 +31,7 @@ index = 0 ...@@ -31,10 +31,7 @@ index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
t = 30 t = 30
e=pygame.sprite.Group()
aa=Block(bush,cacti,stone) aa=Block(bush,cacti,stone)
t2=0
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -67,12 +64,6 @@ while True: ...@@ -67,12 +64,6 @@ while True:
if index >= 5: if index >= 5:
index = 0 index = 0
# 将背景图画上去 # 将背景图画上去
t2+=1
if t2>60:
t2=0
b=random.randint(0,50)
if b>20:
e.add(aa)
shan_x -=2 shan_x -=2
if shan_x <-1000: if shan_x <-1000:
shan_x=0 shan_x=0
...@@ -85,8 +76,7 @@ while True: ...@@ -85,8 +76,7 @@ while True:
if aa.rect.x <= 0-aa.rect.width: # 障碍物消失 if aa.rect.x <= 0-aa.rect.width: # 障碍物消失
# 创建障碍物对象 # 创建障碍物对象
aa.kill() aa=Block(bush,cacti,stone)
aa.rect.x -= 8 aa.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