Commit bff14a14 by BellCodeEditor

auto save

parent eb31bc38
Showing with 2 additions and 10 deletions
......@@ -31,11 +31,8 @@ index = 0
y = 400
jumpState = "runing"
t = 30
aa=Block(bush,cacti,stone)
bb=Block(bush,cacti,stone)
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -81,13 +78,9 @@ while True:
# 创建障碍物对象
aa=Block(bush,cacti,stone)
aa.rect.x -= 8
if bb.rect.x <= 0-bb.rect.width: # 障碍物消失
# 创建障碍物对象
bb=Block(bush,cacti,stone)
bb.rect.x -= 8
screen.blit(aa.image, (aa.rect.x, aa.rect.y))
screen.blit(bb.image, (bb.rect.x, bb.rect.y))
# 刷新画面
pygame.display.update()
FPS.tick(60)
\ No newline at end of file
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