Powerup sound, not done
This commit is contained in:
Binary file not shown.
@@ -42,6 +42,8 @@
|
|||||||
#include "Rendering/CSprite.h"
|
#include "Rendering/CSprite.h"
|
||||||
#include "Rendering/CModel.h"
|
#include "Rendering/CModel.h"
|
||||||
|
|
||||||
|
#include "Sound/EPlaySound.h"
|
||||||
|
|
||||||
|
|
||||||
namespace dd
|
namespace dd
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -820,6 +820,7 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event)
|
|||||||
|
|
||||||
model = m_World->GetComponent<Components::Model>(event.Entity1);
|
model = m_World->GetComponent<Components::Model>(event.Entity1);
|
||||||
}
|
}
|
||||||
|
Events::PlaySound se;
|
||||||
|
|
||||||
//Spawn a particle when a brick collides with somthing
|
//Spawn a particle when a brick collides with somthing
|
||||||
Events::CreateParticleSequence e;
|
Events::CreateParticleSequence e;
|
||||||
@@ -843,14 +844,19 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event)
|
|||||||
auto PowerKraken = m_World->GetComponent<Components::KrakenAttackBrick>(entity);
|
auto PowerKraken = m_World->GetComponent<Components::KrakenAttackBrick>(entity);
|
||||||
|
|
||||||
if (PowerFriend) {
|
if (PowerFriend) {
|
||||||
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
e.SpriteFile = "Textures/PowerUps/Friends.png";
|
e.SpriteFile = "Textures/PowerUps/Friends.png";
|
||||||
} else if (PowerSaviour) {
|
} else if (PowerSaviour) {
|
||||||
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
e.SpriteFile = "Textures/PowerUps/Saviour.png";
|
e.SpriteFile = "Textures/PowerUps/Saviour.png";
|
||||||
} else if (PowerSticky) {
|
} else if (PowerSticky) {
|
||||||
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
e.SpriteFile = "Textures/PowerUps/Sticky.png";
|
e.SpriteFile = "Textures/PowerUps/Sticky.png";
|
||||||
} else if (PowerInkBlaster){
|
} else if (PowerInkBlaster){
|
||||||
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
e.SpriteFile = "Textures/PowerUps/InkBlaster.png";
|
e.SpriteFile = "Textures/PowerUps/InkBlaster.png";
|
||||||
} else if (PowerKraken) {
|
} else if (PowerKraken) {
|
||||||
|
se.FilePath = "Sounds/jap-awesome.wav";
|
||||||
e.SpriteFile = "Textures/PowerUps/RealeaseTheKraken.png";
|
e.SpriteFile = "Textures/PowerUps/RealeaseTheKraken.png";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -873,6 +879,7 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
EventBroker->Publish(e);
|
EventBroker->Publish(e);
|
||||||
|
EventBroker->Publish(se);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user