#include "systems/custom_behaviour.h" #include #include "components/custom.h" #include "components/transform.h" #include "scene.h" namespace engine { CustomBehaviourSystem::CustomBehaviourSystem(Scene* scene) : System(scene, {typeid(TransformComponent).hash_code(), typeid(CustomComponent).hash_code()}) { // constructor here } CustomBehaviourSystem::~CustomBehaviourSystem() {} void CustomBehaviourSystem::OnUpdate(float ts) { for (uint32_t entity : entities_) { auto c = scene_->GetComponent(entity); assert(c != nullptr); c->onUpdate(ts); } } void CustomBehaviourSystem::OnComponentInsert(uint32_t entity) { (void)entity; } } // namespace engine