50 lines
774 B
C++
50 lines
774 B
C++
#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<Component> child = m_Components.GetFirst();
|
|
while (child)
|
|
{
|
|
child->Update(deltaTime);
|
|
child = child->GetNext();
|
|
}
|
|
}
|
|
|
|
void Actor::Render(float deltaTime)
|
|
{
|
|
Actor_base::Render(deltaTime);
|
|
RefPtr<Component> child = m_Components.GetFirst();
|
|
while (child)
|
|
{
|
|
child->Render(deltaTime);
|
|
child = child->GetNext();
|
|
}
|
|
}
|
|
|
|
void Actor::Clear()
|
|
{
|
|
}
|
|
|
|
void Actor::AddComponent(RefPtr<Component> Component)
|
|
{
|
|
m_Components.PushBack(Component);
|
|
Component->Parent = this;
|
|
} |