Commit d6f478b6 by BellCodeEditor

auto save

parent 5903ab3a
Showing with 7 additions and 8 deletions
...@@ -32,8 +32,8 @@ y = 400 ...@@ -32,8 +32,8 @@ y = 400
jumpState = "runing" jumpState = "runing"
t = 30 t = 30
road_x=0 road_x=0
aa=Block(bush,cacti,stone) #aa=Block(bush,cacti,stone)
block_list =pygame.sprite.Group() block_list=pygame.sprite.Group()
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -76,15 +76,14 @@ while True: ...@@ -76,15 +76,14 @@ while True:
screen.blit(road, (lu_x, 500)) # 路 screen.blit(road, (lu_x, 500)) # 路
screen.blit(wukong, (150, y)) # 悟空 screen.blit(wukong, (150, y)) # 悟空
aa =Block(bush,cacti,stone) aa=Block(bush,cacti,stone)
block_list.add(aa) block_list.add(aa)
for sprite in block_list: for sprite in block_list:
sprite.rect.x -=8 sprite.rect.x-=8
screen.blit(sprite.image,(sprite.rect.x,sprite.rect.y)) screen.blit(sprite.image,(sprite.rect.x,sprite.rect.y))
screen.blit(aa.image, (aa.rect.x, aa.rect.y)) screen.blit(aa.image, (aa.rect.x, aa.rect.y))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(60) FPS.tick(60)
\ No newline at end of file
\ 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