Added new backgrounds

This commit is contained in:
theo@manjaro 2021-11-21 18:02:46 +01:00
parent 2d5764b14b
commit e3ec185f01
12 changed files with 4948 additions and 3 deletions

View File

@ -79,6 +79,7 @@ class Game():
self.lib = lib
self.pygame = pygame
self.math = math
self.clock = pygame.time.Clock()
self.elapsedtime = 0
@ -132,6 +133,7 @@ class Game():
if self.gameloop: # Si j'ai une boucle de jeu, la lancer
self.gameloop.step(self) # La logique de la boucle
self.gameloop.draw(self) # L'affichage de la boucle
self.clock.tick(120)
if self.scene :
self.scene(self)
self.scene = False

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because it is too large Load Diff

View File

@ -31,8 +31,8 @@ class TilesetRenderer(BaseObject):
self.game.gameloop.summon(e)
def draw(self):
wratio = self.game.globals["cameraw"]/self.game.DISPLAY_WIDTH
hratio = self.game.globals["camerah"]/self.game.DISPLAY_HEIGHT
wratio = self.game.globals["cameraw"]/self.bgs[0]["sprite"].get_width()
hratio = self.game.globals["camerah"]/self.bgs[0]["sprite"].get_height()
lastoffset = 0
for i,bg in enumerate(self.bgs):
ratio = 1-(len(self.bgs)-i)/len(self.bgs)

View File

@ -18,7 +18,7 @@ def main(game):
game.gameloop.summon(bg)
game.gameloop.summon(menu)
def ingame(game,level="Level 1"):
def ingame(game,level="Level 2"):
game.scaleCamera(416,234)
game.gameloop.reinit()
tileset = TilesetRenderer(0,0,game,level)