WIP ECS GUI
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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__
|
||||
Reference in New Issue
Block a user