Updated playsound events.

This commit is contained in:
Stiffly
2015-09-23 12:08:05 +02:00
parent a010a8be77
commit 4f341250d7
4 changed files with 31 additions and 58 deletions
-25
View File
@@ -1,25 +0,0 @@
#ifndef EVENTS_EPLAYBGM_H__
#define EVENTS_EPLAYBGM_H__
#include "Core/EventBroker.h"
namespace dd
{
namespace Events
{
struct PlayBGM : public Event
{
std::string path;
float volume = 1;
//TODO: Rethink this
bool SupportBGM;
};
}
}
#endif
+2
View File
@@ -30,6 +30,8 @@ namespace Events
struct PlaySFX : Event
{
std::string path;
float volume = 1.f;
bool loop = false;
};
}
-3
View File
@@ -8,7 +8,6 @@
#include "Core/World.h"
#include "Sound.h"
#include "Sound/EPlaySFX.h"
#include "Sound/EPlayBGM.h"
#include "Physics/EContact.h"
#include "Core/EventBroker.h"
#include "Game/CBall.h"
@@ -37,10 +36,8 @@ private:
//Events
dd::EventRelay<SoundSystem, dd::Events::PlaySFX> m_EPlaySFX;
dd::EventRelay<SoundSystem, dd::Events::Contact> m_EContact;
dd::EventRelay<SoundSystem, dd::Events::PlayBGM> m_EPlayBGM;
bool OnPlaySFX(const dd::Events::PlaySFX &event);
bool OnContact(const dd::Events::Contact &event);
bool OnPlayBGM(const dd::Events::PlayBGM &event);
ALuint CreateSource();