Powerup sound, not done

This commit is contained in:
Stiffly
2015-10-20 14:20:46 +02:00
parent 71521b5b02
commit ec509358b1
3 changed files with 9 additions and 0 deletions
Binary file not shown.
+2
View File
@@ -42,6 +42,8 @@
#include "Rendering/CSprite.h"
#include "Rendering/CModel.h"
#include "Sound/EPlaySound.h"
namespace dd
{
+7
View File
@@ -820,6 +820,7 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event)
model = m_World->GetComponent<Components::Model>(event.Entity1);
}
Events::PlaySound se;
//Spawn a particle when a brick collides with somthing
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);
if (PowerFriend) {
se.FilePath = "Sounds/jap-awesome.wav";
e.SpriteFile = "Textures/PowerUps/Friends.png";
} else if (PowerSaviour) {
se.FilePath = "Sounds/jap-awesome.wav";
e.SpriteFile = "Textures/PowerUps/Saviour.png";
} else if (PowerSticky) {
se.FilePath = "Sounds/jap-awesome.wav";
e.SpriteFile = "Textures/PowerUps/Sticky.png";
} else if (PowerInkBlaster){
se.FilePath = "Sounds/jap-awesome.wav";
e.SpriteFile = "Textures/PowerUps/InkBlaster.png";
} else if (PowerKraken) {
se.FilePath = "Sounds/jap-awesome.wav";
e.SpriteFile = "Textures/PowerUps/RealeaseTheKraken.png";
}
else {
@@ -873,6 +879,7 @@ bool dd::Systems::PhysicsSystem::OnContact(const dd::Events::Contact &event)
}
EventBroker->Publish(e);
EventBroker->Publish(se);
return true;