Untitled Game engine no.5
1.0
|
10 Scene* m_Scene =
nullptr;
18 template<
class C,
typename... Args>
22 return m_Scene->m_ecs.
AddComponent<C>(m_id, std::forward<Args>(args)...);
25 template<
class C,
class G>
28 return m_Scene->m_ecs.
AddComponent<C>(m_id, dynamic_pointer_cast<C>(c));
34 return m_Scene->m_ecs.
AddComponent<C>(m_id, std::forward<C>(c));
44 EntityID GetID()
const {
A container for entities currently in the Scene.
Definition: Scene.hpp:9
Ref< C > AddComponent(G c)
Adds a component of type C to an entity without args can take in any arbitrary type and attempts a dy...
Definition: Entity.hpp:27
Ref< C > AddComponent(Args &&... args)
Definition: Entity.hpp:21
Ref< C > AddComponent(C &&c)
Adds a component of type C to an entity without args.
Definition: Entity.hpp:33
Ref< C > GetComponent()
Adds a component of type C to an entity without args.
Definition: Entity.hpp:40
Ref< C > AddComponent(EntityID id, Ref< C > args)
Definition: ECS.hpp:106
std::shared_ptr< T > Ref
Has stuff for making references a lot more easily shared smart pointer.
Definition: Base.hpp:21
Ref< C > GetComponent(const EntityID &id)
Definition: ECS.hpp:80
Definition: Animation.hpp:14