Boss fight sounds. bgm, boss-hit, init roar

This commit is contained in:
Stiffly
2015-10-21 15:42:11 +02:00
parent d0668effea
commit 59dbe97191
12 changed files with 40 additions and 4 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ void dd::Systems::KrakenSystem::Initialize()
transform->Position = glm::vec3(50, 50, -10);
//sound
auto collisionSound = m_World->AddComponent<Components::CollisionSound>(ent);
collisionSound->FilePath = "Sounds/Brick/LTTP_Boss_Hit.wav";
collisionSound->FilePath = "Sounds/Boss/boss-hit.wav";
m_World->CommitEntity(ent);
m_KrakenTemplate = ent;
+1 -1
View File
@@ -238,7 +238,7 @@ void dd::Systems::LevelSystem::Initialize()
transform->Position = glm::vec3(50, 50, -10);
//sound
auto collisionSound = m_World->AddComponent<Components::CollisionSound>(m_BrickTemplate);
collisionSound->FilePath = "Sounds/Brick/shortbrickbreak.wav";
collisionSound->FilePath = "Sounds/Brick/brick-hit.wav";
m_World->CommitEntity(m_BrickTemplate);
return;
}
+5 -1
View File
@@ -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;
+28
View File
@@ -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<ConfigFile>("Config.ini")->GetValue<float>("Audio.SFXVolume", 1.f);
m_BGMMasterVolume = ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<float>("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;
}