diff --git a/assets/Sounds/BGM/boss-fight.wav b/assets/Sounds/BGM/boss-fight.wav new file mode 100644 index 0000000..e74ae70 Binary files /dev/null and b/assets/Sounds/BGM/boss-fight.wav differ diff --git a/assets/Sounds/Boss/boss-hit.wav b/assets/Sounds/Boss/boss-hit.wav new file mode 100644 index 0000000..b444809 Binary files /dev/null and b/assets/Sounds/Boss/boss-hit.wav differ diff --git a/assets/Sounds/Boss/boss-roar.wav b/assets/Sounds/Boss/boss-roar.wav new file mode 100644 index 0000000..814dc56 Binary files /dev/null and b/assets/Sounds/Boss/boss-roar.wav differ diff --git a/assets/Sounds/Brick/LTTP_Boss_Hit.wav b/assets/Sounds/Brick/LTTP_Boss_Hit.wav deleted file mode 100644 index b8d4f01..0000000 Binary files a/assets/Sounds/Brick/LTTP_Boss_Hit.wav and /dev/null differ diff --git a/assets/Sounds/Brick/brick-hit.wav b/assets/Sounds/Brick/brick-hit.wav new file mode 100644 index 0000000..83e5cd4 Binary files /dev/null and b/assets/Sounds/Brick/brick-hit.wav differ diff --git a/assets/Sounds/Metal/impact.wav b/assets/Sounds/Metal/impact.wav deleted file mode 100644 index 5a08fc7..0000000 Binary files a/assets/Sounds/Metal/impact.wav and /dev/null differ diff --git a/include/Game/LevelSystem.h b/include/Game/LevelSystem.h index b93fc7b..ae80c9d 100755 --- a/include/Game/LevelSystem.h +++ b/include/Game/LevelSystem.h @@ -144,7 +144,7 @@ private: bool m_Pause = false; int m_LooseBricks = 0; int m_CurrentCluster = 1; - int m_CurrentLevel = 1; + int m_CurrentLevel = 5; int m_MultiBalls = 0; int m_PowerUps = 0; int m_Score = 0; diff --git a/include/Sound/SoundSystem.h b/include/Sound/SoundSystem.h index 56bd837..6aa577c 100644 --- a/include/Sound/SoundSystem.h +++ b/include/Sound/SoundSystem.h @@ -20,6 +20,7 @@ #include "Physics/ECreateParticleSequence.h" #include "Physics/EContact.h" #include "Game/EGameStart.h" +#include "Game/EKrakenAppear.h" namespace dd @@ -42,6 +43,7 @@ private: const std::string GAME_BGM = "Sounds/BGM/under-the-sea-n.wav"; const std::string WATER_BGM = "Sounds/BGM/water-flowing.wav"; const std::string STORY_VOICE = "Sounds/jap-story.wav"; + const std::string BOSS_BGM = "Sounds/BGM/boss-fight.wav"; float m_BGMMasterVolume = 1.f; float m_SFXMasterVolume = 1.f; @@ -62,6 +64,8 @@ private: bool OnMasterVolume(const dd::Events::MasterVolume &event); dd::EventRelay m_EGameStart; bool OnGameStart(const dd::Events::GameStart &event); + dd::EventRelay m_EKrakenAppear; + bool OnKrakenAppear(const dd::Events::KrakenAppear &event); ALuint CreateSource(); diff --git a/src/game/Game/KrakenSystem.cpp b/src/game/Game/KrakenSystem.cpp index 56a1dae..eccaa2d 100644 --- a/src/game/Game/KrakenSystem.cpp +++ b/src/game/Game/KrakenSystem.cpp @@ -40,7 +40,7 @@ void dd::Systems::KrakenSystem::Initialize() transform->Position = glm::vec3(50, 50, -10); //sound auto collisionSound = m_World->AddComponent(ent); - collisionSound->FilePath = "Sounds/Brick/LTTP_Boss_Hit.wav"; + collisionSound->FilePath = "Sounds/Boss/boss-hit.wav"; m_World->CommitEntity(ent); m_KrakenTemplate = ent; diff --git a/src/game/Game/LevelSystem.cpp b/src/game/Game/LevelSystem.cpp index 15f0e4d..f4e90dc 100755 --- a/src/game/Game/LevelSystem.cpp +++ b/src/game/Game/LevelSystem.cpp @@ -238,7 +238,7 @@ void dd::Systems::LevelSystem::Initialize() transform->Position = glm::vec3(50, 50, -10); //sound auto collisionSound = m_World->AddComponent(m_BrickTemplate); - collisionSound->FilePath = "Sounds/Brick/shortbrickbreak.wav"; + collisionSound->FilePath = "Sounds/Brick/brick-hit.wav"; m_World->CommitEntity(m_BrickTemplate); return; } diff --git a/src/game/Physics/PhysicsSystem.cpp b/src/game/Physics/PhysicsSystem.cpp index ce67687..8ee030f 100755 --- a/src/game/Physics/PhysicsSystem.cpp +++ b/src/game/Physics/PhysicsSystem.cpp @@ -845,18 +845,23 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event) if (PowerFriend) { se.FilePath = "Sounds/jap-awesome.wav"; + EventBroker->Publish(se); e.SpriteFile = "Textures/PowerUps/Friends.png"; } else if (PowerSaviour) { se.FilePath = "Sounds/jap-awesome.wav"; + EventBroker->Publish(se); e.SpriteFile = "Textures/PowerUps/Saviour.png"; } else if (PowerSticky) { se.FilePath = "Sounds/jap-awesome.wav"; + EventBroker->Publish(se); e.SpriteFile = "Textures/PowerUps/Sticky.png"; } else if (PowerInkBlaster){ se.FilePath = "Sounds/jap-awesome.wav"; + EventBroker->Publish(se); e.SpriteFile = "Textures/PowerUps/InkBlaster.png"; } else if (PowerKraken) { se.FilePath = "Sounds/jap-awesome.wav"; + EventBroker->Publish(se); e.SpriteFile = "Textures/PowerUps/RealeaseTheKraken.png"; } else { @@ -879,7 +884,6 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event) } EventBroker->Publish(e); - EventBroker->Publish(se); return true; diff --git a/src/game/Sound/SoundSystem.cpp b/src/game/Sound/SoundSystem.cpp index afafec3..0d3d8e7 100644 --- a/src/game/Sound/SoundSystem.cpp +++ b/src/game/Sound/SoundSystem.cpp @@ -40,6 +40,7 @@ void dd::Systems::SoundSystem::Initialize() EVENT_SUBSCRIBE_MEMBER(m_EStopSound, &SoundSystem::OnStopSound); EVENT_SUBSCRIBE_MEMBER(m_EMasterVolume, &SoundSystem::OnMasterVolume); EVENT_SUBSCRIBE_MEMBER(m_EGameStart, &SoundSystem::OnGameStart); + EVENT_SUBSCRIBE_MEMBER(m_EKrakenAppear, &SoundSystem::OnKrakenAppear); m_SFXMasterVolume = ResourceManager::Load("Config.ini")->GetValue("Audio.SFXVolume", 1.f); m_BGMMasterVolume = ResourceManager::Load("Config.ini")->GetValue("Audio.BGMVolume", 1.f); @@ -214,5 +215,32 @@ bool dd::Systems::SoundSystem::OnGameStart(const dd::Events::GameStart &event) return true; } +bool dd::Systems::SoundSystem::OnKrakenAppear(const dd::Events::KrakenAppear &event) +{ + { + dd::Events::StopSound e; + e.FilePath = GAME_BGM; + EventBroker->Publish(e); + } + { + dd::Events::StopSound e; + e.FilePath = WATER_BGM; + EventBroker->Publish(e); + } + { + dd::Events::PlaySound e; + e.FilePath = BOSS_BGM; + e.IsAmbient = true; + e.Gain = 0.4f; + EventBroker->Publish(e); + } + { + dd::Events::PlaySound e; + e.FilePath = "Sounds/Boss/boss-roar.wav"; + EventBroker->Publish(e); + } + return true; +} +