CoriEngine
Loading...
Searching...
No Matches
Cori::World::EntityState Class Reference

An abstract class designed to be used with StateMachine component. More...

#include <EntityState.hpp>

Public Member Functions

virtual ~EntityState ()=default
virtual void OnEnter (Entity &owner, const std::type_index &lastStateType)
 Fired when then Entity enter the state.
virtual void OnTickUpdate (Entity &owner, float timestep)
 Fired every tick when the Entity is in the state. Expect for the very first tick the Entity entered the state.
virtual void OnExit (Entity &owner, const std::type_index &nextStateType)
 Fired when the Entity exist the state.
virtual const char * GetDebugName () const

Detailed Description

An abstract class designed to be used with StateMachine component.

Definition at line 15 of file EntityState.hpp.

Constructor & Destructor Documentation

◆ ~EntityState()

virtual Cori::World::EntityState::~EntityState ( )
virtualdefault

Member Function Documentation

◆ GetDebugName()

virtual const char * Cori::World::EntityState::GetDebugName ( ) const
inlinenodiscardvirtual

Definition at line 40 of file EntityState.hpp.

◆ OnEnter()

virtual void Cori::World::EntityState::OnEnter ( Entity & owner,
const std::type_index & lastStateType )
inlinevirtual

Fired when then Entity enter the state.

Parameters
ownerOwner of the StateMachine component.
lastStateTypeThe type_index of the last state, if there is no last state it is the type_index of the current state.

Definition at line 24 of file EntityState.hpp.

◆ OnExit()

virtual void Cori::World::EntityState::OnExit ( Entity & owner,
const std::type_index & nextStateType )
inlinevirtual

Fired when the Entity exist the state.

Parameters
ownerOwner of the StateMachine component.
nextStateTypeThe type_index of the next state.

Definition at line 38 of file EntityState.hpp.

◆ OnTickUpdate()

virtual void Cori::World::EntityState::OnTickUpdate ( Entity & owner,
float timestep )
inlinevirtual

Fired every tick when the Entity is in the state. Expect for the very first tick the Entity entered the state.

Parameters
ownerOwner of the StateMachine component.
timestepDo I need to explain this?

Definition at line 31 of file EntityState.hpp.


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