Overworld zene

This commit is contained in:
markojozsef
2026-10-18 14:39:45 +02:00
parent fde022f626
commit 6edd6ff6f0

View File

@@ -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):