Refactored factory and component system.
This commit is contained in:
@@ -4,8 +4,7 @@
|
||||
#include "System.h"
|
||||
#include "logging.h"
|
||||
|
||||
#include "Components/TransformComponent.h"
|
||||
|
||||
#include "Components/Transform.h"
|
||||
|
||||
namespace Systems
|
||||
{
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "InputSystem.h"
|
||||
#include "World.h"
|
||||
|
||||
void Systems::InputSystem::Update(double dt, EntityID entity, EntityID parent)
|
||||
{
|
||||
auto input = m_World->GetComponent<Components::Input>(entity, "Input");
|
||||
if (input == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef InputSystem_h__
|
||||
#define InputSystem_h__
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#include "System.h"
|
||||
|
||||
#include "Components/Input.h"
|
||||
|
||||
namespace Systems
|
||||
{
|
||||
|
||||
class InputSystem : public System
|
||||
{
|
||||
public:
|
||||
InputSystem(World* world)
|
||||
: System(world)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Update(double dt, EntityID entity, EntityID parent) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // InputSystem_h__
|
||||
|
||||
Reference in New Issue
Block a user