Commit 5eeb05ac by BellCodeEditor

save project

parent 3d33128f
Showing with 5 additions and 1 deletions
......@@ -8,7 +8,7 @@ class Block(pygame.sprite.Sprite):
super().__int__()
self.image = random.choice([image1,image2,image3])
self..rect = self.image.get_rect()
self.arect = self.image.get_rect()
self.rect.x=1000
self.rect.y = 500-self.rect.height
......@@ -35,7 +35,9 @@ jumpState = "runing"
t = 30
road_x = 0
bg_x = 0
obstacle = random.choice([bush, stone, cacti])
dfg_li=pygame.sprite.Group()
rect = obstacle.get_rect()
rect.x = 1000
rect.y = 500 - rect.height
......@@ -90,5 +92,6 @@ while True:
rect.x -= 8
screen.blit(obstacle, (rect.x, 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