Files
Seele/src/Engine/Actor/Actor.h
T
2023-01-21 18:43:21 +01:00

30 lines
690 B
C++

#pragma once
#include "Entity.h"
#include "Component/Transform.h"
namespace Seele
{
DECLARE_REF(Actor)
// Actors are entities that are part of the scene hierarchy
// In order for that hierarchy to make sense it requires at least a transform component
class Actor : public Entity
{
public:
Actor(PScene scene);
virtual ~Actor();
PActor getParent();
void addChild(PActor child);
void removeChild(PActor child);
Array<PActor> getChildren();
Component::Transform& getTransform();
protected:
//Component::Transform& getTransform();
void setParent(PActor parent);
PActor parent;
Array<PActor> children;
};
DEFINE_REF(Actor)
} // namespace Seele