#include "Actor.h" #include "EngineFrame/Scene/Scene.h" Actor::Actor() { } Actor::~Actor() { } void Actor::Init() { } void Actor::HandleEvents(SDL_Event *e) { } void Actor::Update(float deltaTime) { Actor_base::Update(deltaTime); RefPtr child = m_Components.GetFirst(); while (child) { child->Update(deltaTime); child = child->GetNext(); } } void Actor::Render(float deltaTime) { Actor_base::Render(deltaTime); RefPtr child = m_Components.GetFirst(); while (child) { child->Render(deltaTime); child = child->GetNext(); } } void Actor::Clear() { } void Actor::AddComponent(RefPtr Component) { m_Components.PushBack(Component); Component->Parent = this; }