diff --git a/assets/story/boss_fight/game_over.mp3 b/assets/story/boss_fight/game_over.mp3 index 034338b..a725981 100644 Binary files a/assets/story/boss_fight/game_over.mp3 and b/assets/story/boss_fight/game_over.mp3 differ diff --git a/assets/story/boss_fight/hit.mp3 b/assets/story/boss_fight/hit.mp3 new file mode 100644 index 0000000..ac7c537 Binary files /dev/null and b/assets/story/boss_fight/hit.mp3 differ diff --git a/assets/story/boss_fight/music.mp3 b/assets/story/boss_fight/music.mp3 new file mode 100644 index 0000000..a7c66d2 Binary files /dev/null and b/assets/story/boss_fight/music.mp3 differ diff --git a/assets/story/boss_fight/shoot/1.wav b/assets/story/boss_fight/shoot/1.wav new file mode 100644 index 0000000..14c6707 Binary files /dev/null and b/assets/story/boss_fight/shoot/1.wav differ diff --git a/assets/story/boss_fight/shoot/2.wav b/assets/story/boss_fight/shoot/2.wav new file mode 100644 index 0000000..c52bca8 Binary files /dev/null and b/assets/story/boss_fight/shoot/2.wav differ diff --git a/assets/story/boss_fight/shoot/3.wav b/assets/story/boss_fight/shoot/3.wav new file mode 100644 index 0000000..329d614 Binary files /dev/null and b/assets/story/boss_fight/shoot/3.wav differ diff --git a/assets/story/boss_fight/zone.mp3 b/assets/story/boss_fight/zone.mp3 new file mode 100644 index 0000000..27e04f9 Binary files /dev/null and b/assets/story/boss_fight/zone.mp3 differ diff --git a/src/plugins/assets.py b/src/plugins/assets.py index e56176e..fd6b92e 100644 --- a/src/plugins/assets.py +++ b/src/plugins/assets.py @@ -216,7 +216,7 @@ def loading_scene(target: Scene, name: str, clear_cache: bool = True): order=1000000001, area=(0, 0, 0, render.HEIGHT), ), - Sound(assets.waiting_sound, loop=True, fade_ms=10000), + Sound(assets.waiting_sound, loop=True), ) @staticmethod diff --git a/src/scenes/story/boss_fight.py b/src/scenes/story/boss_fight.py index cc134b2..6f816e0 100644 --- a/src/scenes/story/boss_fight.py +++ b/src/scenes/story/boss_fight.py @@ -19,6 +19,10 @@ from plugins.assets import Assets from plugins.coroutine import condition, wait, Coroutine from plugins.sound import Sound from plugins.timing import Delta, TimedEvent +from plugins.multisound import MultiSound + + +SHOOT = MultiSound("shoot/1", "shoot/2", "shoot/3", volume=0.1) class Velocity(int): @@ -144,6 +148,8 @@ def __initialize_world(world: World): """ TODO """ + world.new_entity().set(Sound(world[Assets].get_sound("music"), True, 0.5)) + world.set( ShieldPos(Vec2(render.WIDTH / 2, 750)), FightBox(), @@ -317,6 +323,7 @@ def __check_hurt(world: World): ) else: entity.destroy() + world.new_entity().set(Sound(world[Assets].get_sound("hit"))) world.new_entity().set(Coroutine(__set_hurtable_hurt(world))) world.set(Hurtable.FALSE) __update_life_bar(world) @@ -335,6 +342,8 @@ def __defeat(world: World): entity.remove(smooth.Target) for entity in world.query(Animation): entity.remove(Animation) + for entity in world.query(Sound): + entity.remove(Sound) for entity in world.query(Player): entity.set( @@ -347,7 +356,7 @@ def __defeat(world: World): world.new_entity().set( Sprite(world[Assets].error_texture, order=20), Animation("animation_bg_mort", 24), - Sound(world[Assets].get_sound("game_over"), True, 0.5, 10000), + Sound(world[Assets].get_sound("game_over"), True, 1), ) elif len(world[Held]) > 0 and len(world.query(Animation)) == 0: world[CurrentScene] = __new_game_scene() @@ -414,6 +423,7 @@ def __create_zone_attack(world: World, number: int = 2): ) yield animation.wait() entity.destroy() + world.new_entity().set(Sound(world[Assets].get_sound("zone"))) for i in range(10): projectile = world.new_entity() @@ -624,6 +634,7 @@ def __rainning_projectiles(world: World, number: int = 20): yield animation.wait() yield wait(0.2) entity.set(smooth.Target(Vec2(entity[Sprite].position.x, 1121))) + world.new_entity().set(SHOOT) for entity in world.query(RainProjectiles, Sprite): if entity[Sprite].position.y > 1080: @@ -650,6 +661,7 @@ def __horizontal_projectile(world: World, left: bool, number: int = 10): ) yield animation.wait() yield wait(1) + world.new_entity().set(SHOOT) entity.set( smooth.Target(Vec2(1500 if left else -81, entity[Sprite].position.y)) )