Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ObjectComponent Class Referenceabstract

#include <ObjectComponent.h>

+ Inheritance diagram for ObjectComponent:
+ Collaboration diagram for ObjectComponent:

Public Member Functions

 ObjectComponent ()=default
 
virtual ~ObjectComponent ()=default
 
ObjectGetEntity () const
 
virtual void SetEntity (Object *_owner)
 
virtual ComponentType GetComponentType () const =0
 
virtual void Initialize ()
 
virtual void Process ()
 
virtual void Render ()
 
virtual void RenderDebug ()
 
virtual void OnEvent (const Message &)
 
virtual void SetOwner (Object *_owner)
 
ObjectGetOwner () const
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
uint64_t GetUID () const
 

Protected Attributes

Objectowner = nullptr
 
GameObjectgao = nullptr
 
- Protected Attributes inherited from Object
uint64_t uid = 0
 

Static Protected Attributes

static floatfDt = GameEngine::fDt
 

Additional Inherited Members

- Public Attributes inherited from Object
std::string name = "unnamed_object"
 

Detailed Description

Definition at line 25 of file ObjectComponent.h.

Constructor & Destructor Documentation

◆ ObjectComponent()

ObjectComponent::ObjectComponent ( )
explicitdefault

◆ ~ObjectComponent()

virtual ObjectComponent::~ObjectComponent ( )
virtualdefault

Member Function Documentation

◆ GetComponentType()

virtual ComponentType ObjectComponent::GetComponentType ( ) const
pure virtual

◆ GetEntity()

Object * ObjectComponent::GetEntity ( ) const
inline

Definition at line 31 of file ObjectComponent.h.

References owner.

◆ GetOwner()

Object * ObjectComponent::GetOwner ( ) const
inline

Definition at line 55 of file ObjectComponent.h.

References owner.

◆ Initialize()

virtual void ObjectComponent::Initialize ( )
inlinevirtual

Reimplemented in _Sprite, and AI_Player.

Definition at line 37 of file ObjectComponent.h.

◆ OnEvent()

void ObjectComponent::OnEvent ( const Message msg)
virtual

◆ Process()

virtual void ObjectComponent::Process ( )
inlinevirtual

Reimplemented from Object.

Reimplemented in AI_Npc, AI_Player, PhysicsComponent, AIComponent, AudioComponent, SystemComponent, and ProcessusComponent.

Definition at line 40 of file ObjectComponent.h.

◆ Render()

virtual void ObjectComponent::Render ( )
inlinevirtual

Reimplemented from Object.

Reimplemented in VisualComponent, and _Sprite.

Definition at line 43 of file ObjectComponent.h.

◆ RenderDebug()

virtual void ObjectComponent::RenderDebug ( )
inlinevirtual

Reimplemented in AI_Player, and _Sprite.

Definition at line 44 of file ObjectComponent.h.

◆ SetEntity()

virtual void ObjectComponent::SetEntity ( Object _owner)
inlinevirtual

Definition at line 32 of file ObjectComponent.h.

References GetComponentTypeID_Static(), and owner.

+ Here is the call graph for this function:

◆ SetOwner()

virtual void ObjectComponent::SetOwner ( Object _owner)
inlinevirtual

Reimplemented in AI_Npc, AI_Player, and AIComponent.

Definition at line 50 of file ObjectComponent.h.

References gao, GetComponentTypeID_Static(), and owner.

Referenced by ObjectFactory::AddComponent(), and AIComponent::SetOwner().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ fDt

float & ObjectComponent::fDt = GameEngine::fDt
staticprotected

Definition at line 59 of file ObjectComponent.h.

Referenced by AI_Player::Process().

◆ gao

GameObject* ObjectComponent::gao = nullptr
protected

◆ owner

Object* ObjectComponent::owner = nullptr
protected

The documentation for this class was generated from the following files: