Simple HelloWorld Event for understanding.
This commit is contained in:
+20
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user