Boss fight sounds. bgm, boss-hit, init roar
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -144,7 +144,7 @@ private:
|
|||||||
bool m_Pause = false;
|
bool m_Pause = false;
|
||||||
int m_LooseBricks = 0;
|
int m_LooseBricks = 0;
|
||||||
int m_CurrentCluster = 1;
|
int m_CurrentCluster = 1;
|
||||||
int m_CurrentLevel = 1;
|
int m_CurrentLevel = 5;
|
||||||
int m_MultiBalls = 0;
|
int m_MultiBalls = 0;
|
||||||
int m_PowerUps = 0;
|
int m_PowerUps = 0;
|
||||||
int m_Score = 0;
|
int m_Score = 0;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "Physics/ECreateParticleSequence.h"
|
#include "Physics/ECreateParticleSequence.h"
|
||||||
#include "Physics/EContact.h"
|
#include "Physics/EContact.h"
|
||||||
#include "Game/EGameStart.h"
|
#include "Game/EGameStart.h"
|
||||||
|
#include "Game/EKrakenAppear.h"
|
||||||
|
|
||||||
|
|
||||||
namespace dd
|
namespace dd
|
||||||
@@ -42,6 +43,7 @@ private:
|
|||||||
const std::string GAME_BGM = "Sounds/BGM/under-the-sea-n.wav";
|
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 WATER_BGM = "Sounds/BGM/water-flowing.wav";
|
||||||
const std::string STORY_VOICE = "Sounds/jap-story.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_BGMMasterVolume = 1.f;
|
||||||
float m_SFXMasterVolume = 1.f;
|
float m_SFXMasterVolume = 1.f;
|
||||||
@@ -62,6 +64,8 @@ private:
|
|||||||
bool OnMasterVolume(const dd::Events::MasterVolume &event);
|
bool OnMasterVolume(const dd::Events::MasterVolume &event);
|
||||||
dd::EventRelay<SoundSystem, dd::Events::GameStart> m_EGameStart;
|
dd::EventRelay<SoundSystem, dd::Events::GameStart> m_EGameStart;
|
||||||
bool OnGameStart(const dd::Events::GameStart &event);
|
bool OnGameStart(const dd::Events::GameStart &event);
|
||||||
|
dd::EventRelay <SoundSystem, dd::Events::KrakenAppear> m_EKrakenAppear;
|
||||||
|
bool OnKrakenAppear(const dd::Events::KrakenAppear &event);
|
||||||
|
|
||||||
|
|
||||||
ALuint CreateSource();
|
ALuint CreateSource();
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void dd::Systems::KrakenSystem::Initialize()
|
|||||||
transform->Position = glm::vec3(50, 50, -10);
|
transform->Position = glm::vec3(50, 50, -10);
|
||||||
//sound
|
//sound
|
||||||
auto collisionSound = m_World->AddComponent<Components::CollisionSound>(ent);
|
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_World->CommitEntity(ent);
|
||||||
|
|
||||||
m_KrakenTemplate = ent;
|
m_KrakenTemplate = ent;
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ void dd::Systems::LevelSystem::Initialize()
|
|||||||
transform->Position = glm::vec3(50, 50, -10);
|
transform->Position = glm::vec3(50, 50, -10);
|
||||||
//sound
|
//sound
|
||||||
auto collisionSound = m_World->AddComponent<Components::CollisionSound>(m_BrickTemplate);
|
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);
|
m_World->CommitEntity(m_BrickTemplate);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -845,18 +845,23 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event)
|
|||||||
|
|
||||||
if (PowerFriend) {
|
if (PowerFriend) {
|
||||||
se.FilePath = "Sounds/jap-awesome.wav";
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
|
EventBroker->Publish(se);
|
||||||
e.SpriteFile = "Textures/PowerUps/Friends.png";
|
e.SpriteFile = "Textures/PowerUps/Friends.png";
|
||||||
} else if (PowerSaviour) {
|
} else if (PowerSaviour) {
|
||||||
se.FilePath = "Sounds/jap-awesome.wav";
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
|
EventBroker->Publish(se);
|
||||||
e.SpriteFile = "Textures/PowerUps/Saviour.png";
|
e.SpriteFile = "Textures/PowerUps/Saviour.png";
|
||||||
} else if (PowerSticky) {
|
} else if (PowerSticky) {
|
||||||
se.FilePath = "Sounds/jap-awesome.wav";
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
|
EventBroker->Publish(se);
|
||||||
e.SpriteFile = "Textures/PowerUps/Sticky.png";
|
e.SpriteFile = "Textures/PowerUps/Sticky.png";
|
||||||
} else if (PowerInkBlaster){
|
} else if (PowerInkBlaster){
|
||||||
se.FilePath = "Sounds/jap-awesome.wav";
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
|
EventBroker->Publish(se);
|
||||||
e.SpriteFile = "Textures/PowerUps/InkBlaster.png";
|
e.SpriteFile = "Textures/PowerUps/InkBlaster.png";
|
||||||
} else if (PowerKraken) {
|
} else if (PowerKraken) {
|
||||||
se.FilePath = "Sounds/jap-awesome.wav";
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
|
EventBroker->Publish(se);
|
||||||
e.SpriteFile = "Textures/PowerUps/RealeaseTheKraken.png";
|
e.SpriteFile = "Textures/PowerUps/RealeaseTheKraken.png";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -879,7 +884,6 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
EventBroker->Publish(e);
|
EventBroker->Publish(e);
|
||||||
EventBroker->Publish(se);
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ void dd::Systems::SoundSystem::Initialize()
|
|||||||
EVENT_SUBSCRIBE_MEMBER(m_EStopSound, &SoundSystem::OnStopSound);
|
EVENT_SUBSCRIBE_MEMBER(m_EStopSound, &SoundSystem::OnStopSound);
|
||||||
EVENT_SUBSCRIBE_MEMBER(m_EMasterVolume, &SoundSystem::OnMasterVolume);
|
EVENT_SUBSCRIBE_MEMBER(m_EMasterVolume, &SoundSystem::OnMasterVolume);
|
||||||
EVENT_SUBSCRIBE_MEMBER(m_EGameStart, &SoundSystem::OnGameStart);
|
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_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);
|
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;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user