From 6edd6ff6f00ea02b52302939b27744fe8749fa0b Mon Sep 17 00:00:00 2001 From: markojozsef Date: Sun, 18 Oct 2026 14:39:45 +0200 Subject: [PATCH] Overworld zene --- src/gamestates/overworld.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gamestates/overworld.py b/src/gamestates/overworld.py index f629b76..31e71de 100644 --- a/src/gamestates/overworld.py +++ b/src/gamestates/overworld.py @@ -8,6 +8,9 @@ from objects import BalthasarRenderer, OverworldMap, BattlePodium, DIR_UP, DIR_L WALK_SPEED = 48 +OVERWORLD_MUSIC = "mus_fnafsux" +music_box = None + balthasar = BalthasarRenderer(96,16) overworld = OverworldMap() objects = [ @@ -18,6 +21,7 @@ objects = [ balthasar ] + btrans_active = False btrans_timer = 0 btrans_sound = None @@ -81,13 +85,19 @@ def get_feet_aabb(world_x, world_y, width, height): def start_battle(battle_id): global btrans_active, btrans_timer, btrans_sound gamestate.gamestates["battle"].battle_id = battle_id + music_box.pause() btrans_sound = assets.sounds["sfx_encounter"].play() btrans_active = True btrans_timer = 0 def switch(game): + global music_box in_battle_transition = False overworld.set_player_world_pos(game, balthasar.x, balthasar.y) + if music_box: + music_box.unpause() + else: + music_box = assets.sounds[OVERWORLD_MUSIC].play(loops=True) # !!! CHATGPT !!! def update(game, dt):