Updated playsound events.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace Events
|
||||
struct PlaySFX : Event
|
||||
{
|
||||
std::string path;
|
||||
float volume = 1.f;
|
||||
bool loop = false;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user