Overload  1.1
Game engine with editor
Public Member Functions | Public Attributes | List of all members
OvCore::ECS::Components::AComponent Class Referenceabstract

#include <AComponent.h>

Inheritance diagram for OvCore::ECS::Components::AComponent:
OvCore::API::IInspectorItem OvCore::API::ISerializable OvCore::ECS::Components::Behaviour OvCore::ECS::Components::CAudioListener OvCore::ECS::Components::CAudioSource OvCore::ECS::Components::CCamera OvCore::ECS::Components::CLight OvCore::ECS::Components::CMaterialRenderer OvCore::ECS::Components::CModelRenderer OvCore::ECS::Components::CPhysicalObject OvCore::ECS::Components::CTransform

Public Member Functions

 AComponent (ECS::Actor &p_owner)
 
virtual ~AComponent ()
 
virtual void OnAwake ()
 
virtual void OnStart ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void OnDestroy ()
 
virtual void OnUpdate (float p_deltaTime)
 
virtual void OnFixedUpdate (float p_deltaTime)
 
virtual void OnLateUpdate (float p_deltaTime)
 
virtual void OnCollisionEnter (Components::CPhysicalObject &p_otherObject)
 
virtual void OnCollisionStay (Components::CPhysicalObject &p_otherObject)
 
virtual void OnCollisionExit (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerEnter (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerStay (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerExit (Components::CPhysicalObject &p_otherObject)
 
virtual std::string GetName ()=0
 
- Public Member Functions inherited from OvCore::API::IInspectorItem
virtual void OnInspector (OvUI::Internal::WidgetContainer &p_root)=0
 
- Public Member Functions inherited from OvCore::API::ISerializable
virtual void OnSerialize (tinyxml2::XMLDocument &p_doc, tinyxml2::XMLNode *p_node)=0
 
virtual void OnDeserialize (tinyxml2::XMLDocument &p_doc, tinyxml2::XMLNode *p_node)=0
 

Public Attributes

ECS::Actorowner
 

Detailed Description

AComponent is the base class for any component. A component is a set of data and behaviours (Entity-Component without systems) that is interpreted by the engine (Or the user)

Constructor & Destructor Documentation

◆ AComponent()

OvCore::ECS::Components::AComponent::AComponent ( ECS::Actor p_owner)

Constructor of a AComponent (Must be called by derived classes)

Parameters
p_owner@project: Overload
Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

◆ ~AComponent()

OvCore::ECS::Components::AComponent::~AComponent ( )
virtual

Destroying a AComponent will call dervied classes destructors

Member Function Documentation

◆ GetName()

virtual std::string OvCore::ECS::Components::AComponent::GetName ( )
pure virtual

◆ OnAwake()

virtual void OvCore::ECS::Components::AComponent::OnAwake ( )
inlinevirtual

Called when the scene start right before OnStart It allows you to apply prioritized game logic on scene start

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnCollisionEnter()

virtual void OvCore::ECS::Components::AComponent::OnCollisionEnter ( Components::CPhysicalObject p_otherObject)
inlinevirtual

Called when the owner of this component enter in collision with another physical object

Parameters
p_otherObject

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnCollisionExit()

virtual void OvCore::ECS::Components::AComponent::OnCollisionExit ( Components::CPhysicalObject p_otherObject)
inlinevirtual

Called when the owner of this component exit from collision with another physical object

Parameters
p_otherObject

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnCollisionStay()

virtual void OvCore::ECS::Components::AComponent::OnCollisionStay ( Components::CPhysicalObject p_otherObject)
inlinevirtual

Called when the owner of this component is in collision with another physical object

Parameters
p_otherObject

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnDestroy()

virtual void OvCore::ECS::Components::AComponent::OnDestroy ( )
inlinevirtual

Called when the components gets destroyed

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnDisable()

virtual void OvCore::ECS::Components::AComponent::OnDisable ( )
inlinevirtual

Called when the component gets disabled (owner SetActive set to false) and before OnDestroy() when the component get destroyed

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnEnable()

virtual void OvCore::ECS::Components::AComponent::OnEnable ( )
inlinevirtual

Called when the components gets enabled (owner SetActive set to true) and after OnAwake() on scene starts

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnFixedUpdate()

virtual void OvCore::ECS::Components::AComponent::OnFixedUpdate ( float  p_deltaTime)
inlinevirtual

Called every physics frame

Parameters
p_deltaTime

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnLateUpdate()

virtual void OvCore::ECS::Components::AComponent::OnLateUpdate ( float  p_deltaTime)
inlinevirtual

Called every frame after OnUpdate

Parameters
p_deltaTime

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnStart()

virtual void OvCore::ECS::Components::AComponent::OnStart ( )
inlinevirtual

Called when the scene start right after OnAwake It allows you to apply prioritized game logic on scene start

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnTriggerEnter()

virtual void OvCore::ECS::Components::AComponent::OnTriggerEnter ( Components::CPhysicalObject p_otherObject)
inlinevirtual

Called when the owner of this component enter in trigger with another physical object

Parameters
p_otherObject

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnTriggerExit()

virtual void OvCore::ECS::Components::AComponent::OnTriggerExit ( Components::CPhysicalObject p_otherObject)
inlinevirtual

Called when the owner of this component exit from trigger with another physical object

Parameters
p_otherObject

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnTriggerStay()

virtual void OvCore::ECS::Components::AComponent::OnTriggerStay ( Components::CPhysicalObject p_otherObject)
inlinevirtual

Called when the owner of this component is in trigger with another physical object

Parameters
p_otherObject

Reimplemented in OvCore::ECS::Components::Behaviour.

◆ OnUpdate()

virtual void OvCore::ECS::Components::AComponent::OnUpdate ( float  p_deltaTime)
inlinevirtual

Called every frame

Parameters
p_deltaTime

Reimplemented in OvCore::ECS::Components::Behaviour.

Member Data Documentation

◆ owner

ECS::Actor& OvCore::ECS::Components::AComponent::owner

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