Compare commits

...

2 Commits

Author SHA1 Message Date
theo@manjaro 3a1e866ced Water is more clear 2021-11-27 19:28:25 +01:00
theo@manjaro a7a147f65d Removed music duplicates 2021-11-27 19:27:14 +01:00
8 changed files with 5 additions and 8 deletions

View File

@ -36,7 +36,6 @@ class Game():
mapdico["backgrounds"] = []
mapdico["data"] = None
mapdico["filler"] = None
mapdico["bgm"] = None
mapdico["tilesets"] = {}
scanner = os.scandir(path=mapfolder)
for i in scanner: # Je check tout les fichiers du dossier
@ -51,10 +50,6 @@ class Game():
mapdico["filler"] = pygame.image.load(i.path).convert_alpha()
else:
mapdico["tilesets"][i.name] = pygame.image.load(i.path).convert_alpha()
if len(name)==7:
if name.startswith("bgm"):
if name.endswith(".wav") or name.endswith(".ogg") or name.endswith(".mp3"):
mapdico["bgm"] = pygame.mixer.Sound(i.path)
except:
self.log("Erreur",mapfolder,name,"Fichier invalide")
if name=="map.json":
@ -97,6 +92,7 @@ class Game():
self.globals["completedlevels"] = [] # Levels where the player kicked all non-respawnable ennemies
self.globals["speedrunlevels"] = [] # Levels where the player finished fast enough
self.globals["allunlocked"] = True
self.globals["bgms"] = ["city.ogg","docks.ogg","isle.ogg","isle.ogg","docks.ogg","city.ogg"]
self.init_inputs()
self.scaleCamera()

Binary file not shown.

Binary file not shown.

View File

@ -80,9 +80,10 @@ class TilesetRenderer(BaseObject):
self.spikes = []
self.layers = []
self.spawns = []
self.bgm = level["bgm"]
self.bgm = None
if "levelname" in self.game.globals.keys():
self.bgm = self.game.sound_lib["bgm/"+self.game.globals["bgms"][self.game.globals["levelname"]]]
if self.bgm:
self.bgm.set_volume(self.game.globals["bgmvolume"])
self.bgm.play(-1)
spawnlists = {"Spawns":self.spawns}
ennemies = {"Robot":Robot,"Crate":Crate,"Balloon":Balloon,"Spring":Spring,"WaterChange":WaterChange,"Levels":Levels,"End":EndFlag,"TrashBag":TrashBag,"Ripple":Ripple,"Squid":Squid,"Shooter":Shooter}

View File

@ -15,7 +15,7 @@ class Water(BaseObject):
self.depth = 2
self.sprite = game.pygame.Surface((game.DISPLAY_WIDTH,game.DISPLAY_HEIGHT))
self.sprite.set_alpha(180)
self.sprite.set_alpha(130)
white = [245,237,186]
cyan = [126,196,193]