igor::iBehaviourComponent Class Reference

#include <iBehaviourComponent.h>

Inherits igor::iEntityComponent.

Public Member Functions

 iBehaviourComponent ()
 
std::vector< iaStringgetInfo () const override
 
const std::vector< iBehaviourData > & getBehaviors () const
 
void addBehaviour (const iBehaviourDelegate &delegate, const std::any &userData, const iaString &name, uint8 priority)
 
void removeBehaviour (const iBehaviourDelegate &delegate)
 
void execute ()
 
- Public Member Functions inherited from igor::iEntityComponent
 iEntityComponent ()
 
virtual ~iEntityComponent ()=default
 
const iEntityComponentIDgetID () const
 
iEntityComponentState getState () const
 
virtual std::vector< iaStringgetInfo () const
 
IGOR_INLINE void setDirty ()
 
uint16 getVersion () const
 

Static Public Member Functions

static iEntityComponentcreateInstance ()
 
static const iaStringgetTypeName ()
 

Additional Inherited Members

- Protected Member Functions inherited from igor::iEntityComponent
virtual bool onLoad (iEntityPtr entity, bool &asyncLoad)
 
virtual void onActivate (iEntityPtr entity)
 
virtual void onDeactivate (iEntityPtr entity)
 
virtual void onUnLoad (iEntityPtr entity)
 
virtual iEntityComponentPtr getCopy ()=0
 
iEntityPtr getEntity () const
 

Detailed Description

behaviour component

Constructor & Destructor Documentation

◆ iBehaviourComponent()

igor::iBehaviourComponent::iBehaviourComponent ( )

ctor

Member Function Documentation

◆ addBehaviour()

void igor::iBehaviourComponent::addBehaviour ( const iBehaviourDelegate &  delegate,
const std::any &  userData,
const iaString name,
uint8  priority 
)

adds behaviour

Parameters
behaviourthe behaviour to be added
userDatauser data added to behaviour
namethe name of the behaviour
priorityexecution priority (low = 0, default = 100, high = 255)

◆ createInstance()

iEntityComponent * igor::iBehaviourComponent::createInstance ( )
static

creates instance of this component type

◆ execute()

void igor::iBehaviourComponent::execute ( )

executes all behaviours

◆ getBehaviors()

const std::vector< iBehaviourData > & igor::iBehaviourComponent::getBehaviors ( ) const
Returns
behaviours

◆ getInfo()

std::vector< iaString > igor::iBehaviourComponent::getInfo ( ) const
overridevirtual
Returns
a set of info strings

Reimplemented from igor::iEntityComponent.

◆ getTypeName()

const iaString & igor::iBehaviourComponent::getTypeName ( )
static
Returns
type name of component

◆ removeBehaviour()

void igor::iBehaviourComponent::removeBehaviour ( const iBehaviourDelegate &  delegate)

removes behaviour from entity

Parameters
behaviourthe behaviour to be removed

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