Brunot
Loading...
Searching...
No Matches
Entity.h File Reference

The class containing all entity elements. More...

#include <vector>
#include "Component.h"
#include "ChildrenHandeler.h"
#include "Framework/Engine.h"
#include "System/Messaging.h"
#include "Framework/Factory.h"
#include <memory>
#include "Component/ActionList.h"
#include "Utility/Path/Path.h"
Include dependency graph for Entity.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Entity

Namespaces

namespace  test
namespace  gobj
 namespace for things relating to GameObject, other than GameObject itself

Macros

#define HAS(type)
 A macro for using the template call to get a component of an entity.

Functions

template<typename ActionType>
auto operator<< (gobj::Path< Entity > &entity, const ActionType &action) -> gobj::Path< Entity > &
 Adds a new action to an entity's ActionList component.
template<typename ActionType>
auto operator<< (Entity *entity, const ActionType &action) -> Entity *
 Adds a new action to an entity's ActionList component.
auto test::entityTest () -> void
auto gobj::moveEntity (Entity &entityToMove, Entity &newParent) -> void
 Makes the provided entity a child of another entity.

Detailed Description

The class containing all entity elements.

Author
Aidan Hartman (aidan.nosp@m..har.nosp@m.tman@.nosp@m.digi.nosp@m.pen.e.nosp@m.du) Some buttons for ImGui, Pair program with Marcelo Marcelo Escamilla(marce.nosp@m.lo.e.nosp@m.scami.nosp@m.lla@.nosp@m.digip.nosp@m.en.e.nosp@m.du) JSON serialization, and ImGui implementation Bryley Elder (bryle.nosp@m.y.el.nosp@m.der@d.nosp@m.igip.nosp@m.en.ed.nosp@m.u) Pair Program with Aidan
Date
2025 / 11 / 19

Macro Definition Documentation

◆ HAS

#define HAS ( type)
Value:
GetComponent<type>(Component::c##type)

A macro for using the template call to get a component of an entity.

example call: Transform* transform = MyEntity()->HAS(Transform);

Parameters
typethe type of component to search for on an object
Returns
the component requested, typecast to its inherited class, NULL if not found

Function Documentation

◆ operator<<() [1/2]

template<typename ActionType>
auto operator<< ( Entity * entity,
const ActionType & action )->Entity *

Adds a new action to an entity's ActionList component.

Warning
Will crash if the entity does not have an actionList component
Parameters
entityA pointer to an entity
actionThe action you want to add
Returns
A reference to the path, to allow chaining

◆ operator<<() [2/2]

template<typename ActionType>
auto operator<< ( gobj::Path< Entity > & entity,
const ActionType & action )->gobj::Path< Entity > &

Adds a new action to an entity's ActionList component.

Warning
Will crash if the entity does not have an actionList component
Parameters
entityA path to an entity
actionThe action you want to add
Returns
A reference to the path, to allow chaining
Here is the call graph for this function: