WIP ECS GUI

This commit is contained in:
2014-05-12 22:33:59 +02:00
parent b6372d44b8
commit ad19848c1b
9 changed files with 172 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#include "PrecompiledHeader.h"
#include "RaySystem.h"
#include "World.h"
void Systems::RaySystem::Initialize()
{
// Subscribe to events
EVENT_SUBSCRIBE_MEMBER(m_ECastRay, &Systems::RaySystem::OnCastRay);
}
void Systems::RaySystem::Update(double dt)
{
}
void Systems::RaySystem::UpdateEntity(double dt, EntityID entity, EntityID parent)
{
}
bool Systems::RaySystem::OnCastRay(const Events::CastRay &event)
{
Ray r;
return true;
}
+35
View File
@@ -0,0 +1,35 @@
#ifndef DebugSystem_h__
#define DebugSystem_h__
#include "System.h"
#include "Events/CastRay.h"
namespace Systems
{
class RaySystem : public System
{
public:
RaySystem(World* world, std::shared_ptr<::EventBroker> eventBroker)
: System(world, eventBroker) { }
void Initialize() override;
void Update(double dt) override;
void UpdateEntity(double dt, EntityID entity, EntityID parent) override;
private:
struct Ray
{
glm::vec3 Direction;
};
EventRelay<Events::CastRay> m_ECastRay;
bool OnCastRay(const Events::CastRay &event);
std::list<Ray> m_UnresolvedRays;
//void UpdateEntity(double dt, EntityID entity, EntityID parent) override;
};
}
#endif // DebugSystem_h__