Added new backgrounds
@ -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
|
||||
|
BIN
gamedata/maps/Level 2/background0.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
gamedata/maps/Level 2/background1.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
gamedata/maps/Level 2/background2.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
gamedata/maps/Level 2/background3.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
gamedata/maps/Level 2/background4.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
gamedata/maps/Level 2/background5.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
gamedata/maps/Level 2/base.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
gamedata/maps/Level 2/filler.png
Normal file
After Width: | Height: | Size: 11 KiB |
4943
gamedata/maps/Level 2/map.json
Normal 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)
|
||||
|
@ -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)
|
||||
|