initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#ifndef HYDRAINITIALISECOMPONENTSTASK
|
||||
#define HYDRAINITIALISECOMPONENTSTASK
|
||||
#include "../HydraTask.h"
|
||||
#include "../../engine/HydraEngine.h"
|
||||
#include "../../ecs/HydraECS.h"
|
||||
#include <memory>
|
||||
|
||||
|
||||
class HydraInitialiseComponentsTask : public HydraTask
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
public:
|
||||
virtual void Process() override
|
||||
{
|
||||
GetEngine()->ECS()->InitialiseComponents();
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /* HYDRAINITIALISECOMPONENTSTASK */
|
||||
@@ -0,0 +1,28 @@
|
||||
#ifndef HYDRAUPDATESYSTEMTASK
|
||||
#define HYDRAUPDATESYSTEMTASk
|
||||
#include "../HydraTask.h"
|
||||
#include "../../engine/HydraEngine.h"
|
||||
#include "../../ecs/systems/HydraTransformSystem.h"
|
||||
#include <memory>
|
||||
|
||||
|
||||
class HydraUpdateSystemTask : public HydraTask
|
||||
{
|
||||
private:
|
||||
float m_delta_t_seconds;
|
||||
std::shared_ptr<HydraSystem> m_system;
|
||||
protected:
|
||||
public:
|
||||
virtual void Process() override
|
||||
{
|
||||
m_system->Update(m_delta_t_seconds);
|
||||
}
|
||||
void Initialise(float delta_t_seconds, const std::shared_ptr<HydraSystem>& system)
|
||||
{
|
||||
m_delta_t_seconds = delta_t_seconds;
|
||||
m_system = system;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif /* HYDRAUPDATESYSTEMTASK */
|
||||
Reference in New Issue
Block a user