Simple HelloWorld Event for understanding.

This commit is contained in:
Stiffly
2015-09-09 18:42:08 +02:00
parent 80d98470e9
commit fbeb1fb9a6
5 changed files with 58 additions and 19 deletions
+20 -3
View File
@@ -5,15 +5,32 @@
#ifndef DAYDREAM_SOUND_H
#define DAYDREAM_SOUND_H
#include "Core/EKeyDown.h"
#include "Core/EventBroker.h"
#include "Core/System.h"
#include "Core/World.h"
namespace dd
{
class Sound
namespace Systems
{
class Sound : public System {
public:
void HelloWorld();
private:
Sound(World *world, std::shared_ptr<dd::EventBroker> eventBroker)
: System(world, eventBroker) { EVENT_SUBSCRIBE_MEMBER(m_EKeyDown, &Sound::OnKeyDown); }
void Init();
private:
dd::EventRelay<Sound, dd::Events::KeyDown> m_EKeyDown;
bool OnKeyDown(const dd::Events::KeyDown &event);
void HelloWorld();
};
}
}
#endif //DAYDREAM_SOUND_H