Commit 0594f18a by BellCodeEditor

save project

parent c319dca9
Showing with 3 additions and 1 deletions
...@@ -12,7 +12,7 @@ class Block(pygame.sprite.Sprite): ...@@ -12,7 +12,7 @@ class Block(pygame.sprite.Sprite):
self.image = random.choice([image1,image2,image3]) self.image = random.choice([image1,image2,image3])
self.rect = self.image.get_rect() self.rect = self.image.get_rect()
self.rect.x = 1000 self.rect.x = 1000
self.rect.y = 500-rect.height self.rect.y = 500-self.rect.height#没有加self定义
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((1000, 600)) screen = pygame.display.set_mode((1000, 600))
...@@ -33,8 +33,10 @@ index = 0 ...@@ -33,8 +33,10 @@ index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
t = 30 t = 30
road_x = 0 road_x = 0
bg_x = 0 bg_x = 0
obstacle = Block(bush,cacti,stone) obstacle = Block(bush,cacti,stone)
......
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