2020-04-15 02:03:56 +02:00
|
|
|
#pragma once
|
2022-11-15 12:19:11 +01:00
|
|
|
#include "Entity.h"
|
2022-11-17 16:47:42 +01:00
|
|
|
#include "Component/Transform.h"
|
2020-04-15 02:03:56 +02:00
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
2021-04-01 16:40:14 +02:00
|
|
|
DECLARE_REF(Actor)
|
2022-11-15 12:19:11 +01:00
|
|
|
// 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
|
2020-04-15 02:03:56 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2022-11-15 12:19:11 +01:00
|
|
|
Actor(PScene scene);
|
2020-04-15 02:03:56 +02:00
|
|
|
virtual ~Actor();
|
2020-05-05 01:51:13 +02:00
|
|
|
|
2020-04-15 02:03:56 +02:00
|
|
|
PActor getParent();
|
|
|
|
|
void addChild(PActor child);
|
2022-04-13 13:01:35 +02:00
|
|
|
void removeChild(PActor child);
|
2020-04-15 02:03:56 +02:00
|
|
|
Array<PActor> getChildren();
|
2022-11-15 12:19:11 +01:00
|
|
|
|
2023-01-21 18:43:21 +01:00
|
|
|
Component::Transform& getTransform();
|
2020-11-03 01:18:30 +01:00
|
|
|
|
2020-09-30 13:48:41 +02:00
|
|
|
protected:
|
2022-11-15 12:19:11 +01:00
|
|
|
//Component::Transform& getTransform();
|
2020-05-05 01:51:13 +02:00
|
|
|
void setParent(PActor parent);
|
2020-04-15 02:03:56 +02:00
|
|
|
PActor parent;
|
|
|
|
|
Array<PActor> children;
|
|
|
|
|
};
|
2021-04-01 16:40:14 +02:00
|
|
|
DEFINE_REF(Actor)
|
2020-05-05 01:51:13 +02:00
|
|
|
} // namespace Seele
|