diff --git a/Background.py b/Background.py index 92bda5e..50dac2a 100644 --- a/Background.py +++ b/Background.py @@ -15,6 +15,7 @@ class Background(): backgroundImages = ( pygame.transform.scale(backgroundImage.subsurface((0, 0, 800, 150)), (3200, 600)), pygame.transform.scale(backgroundImage.subsurface((0, 150, 800, 150)), (3200, 600)), + pygame.transform.scale(backgroundImage.subsurface((0, 300, 800, 150)), (3200, 600)), ) for image in backgroundImages: image.set_colorkey((255,0,255)) @@ -23,8 +24,9 @@ class Background(): pygame.sprite.Sprite.__init__(self) self.layers = ( - BackgroundLayer(Background.backgroundImages[0], mainGameClass, 0.5), - BackgroundLayer(Background.backgroundImages[1], mainGameClass, 1), + BackgroundLayer(Background.backgroundImages[0], mainGameClass, 0.25), + BackgroundLayer(Background.backgroundImages[1], mainGameClass, 0.5), + BackgroundLayer(Background.backgroundImages[2], mainGameClass, 1), ) diff --git a/BackgroundLayerFrame.py b/BackgroundLayerFrame.py index e7fe2dd..3c8686e 100644 --- a/BackgroundLayerFrame.py +++ b/BackgroundLayerFrame.py @@ -18,8 +18,12 @@ class BackgroundLayerFrame(pygame.sprite.Sprite): self.rect.center = (mainGameClass.getScreenWidth()/2 + offset[0], mainGameClass.getScreenHeight()/2 + offset[1]) + self.__doubleX = float(self.rect.x) + def update(self): - self.rect.x -= self.mainGameClass.getGameSpeed() * self.speedMultiplier - if self.rect.x < -self.rect.width: - self.rect.x += self.rect.width*2 + self.__doubleX -= self.mainGameClass.getGameSpeed() * self.speedMultiplier + if self.__doubleX < -self.rect.width: + self.__doubleX += self.rect.width*2 + + self.rect.x = self.__doubleX diff --git a/Floor.py b/Floor.py index c06b552..4cfd86e 100644 --- a/Floor.py +++ b/Floor.py @@ -11,7 +11,7 @@ class Floor(pygame.sprite.Sprite): pygame.sprite.Sprite.__init__(self) self.image = pygame.Surface((mainGameClass.getScreenWidth(), mainGameClass.getFloorHeight()*101)) - self.image.fill((255, 204, 102)) + self.image.fill((255, 229, 180)) self.rect = self.image.get_rect() self.rect.center = (mainGameClass.getScreenWidth()/2, mainGameClass.getScreenHeight() + diff --git a/data/background.png b/data/background.png index e2fe42d..1c059eb 100644 Binary files a/data/background.png and b/data/background.png differ diff --git a/data/background.xcf b/data/background.xcf index 8778978..71c3d71 100644 Binary files a/data/background.xcf and b/data/background.xcf differ