Commit be9a3d53 by BellCodeEditor

auto save

parent b09a9a2c
Showing with 6 additions and 6 deletions
...@@ -80,12 +80,12 @@ while True: ...@@ -80,12 +80,12 @@ while True:
screen.blit(wukong, (150, y)) # 悟空 screen.blit(wukong, (150, y)) # 悟空
zhangaiwu=Block(bush,cacti,stone) zhangaiwu=Block(bush,cacti,stone)
block_list.add(zhangaiwu) block_list.add(zhangaiwu)
if xingzhuang.x < 0-xingzhuang.width: #if xingzhuang.x < 0-xingzhuang.width:
zhangaiwu = choice([bush.cacti,stone]) #zhangaiwu = choice([bush.cacti,stone])
zhangaiwu = choice([bush,cacti,stone])#随机获得一个障碍物 #zhangaiwu = choice([bush,cacti,stone])#随机获得一个障碍物
xingzhuang = zhangaiwu.gut_rest()#获得障碍物的坐标和宽,高 #xingzhuang = zhangaiwu.gut_rest()#获得障碍物的坐标和宽,高
xingzhuang.x = 1000#使障碍物的x为1000 #xingzhuang.x = 1000#使障碍物的x为1000
xingzhuang.y = 500-xingzhuang.height#初始化障碍物的坐标 #xingzhuang.y = 500-xingzhuang.height#初始化障碍物的坐标
for sprite in block_list: for sprite in block_list:
sprite.rect.x -= 8 sprite.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