Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::fsm::FSMBehavior Class Reference
Inheritance diagram for grail::fsm::FSMBehavior:
Collaboration diagram for grail::fsm::FSMBehavior:

Public Member Functions

 FSMBehavior (const std::vector< FiniteStateMachine::Transition > &transitions, std::shared_ptr< State > initialState, const std::string &stateMachineName)
 
 FSMBehavior (FiniteStateMachine stateMachine)
 
void Start (AIEntity &owner) override
 
void Update (AIEntity &owner, float deltaTime) override
 
void Finish (AIEntity &owner, const BehaviorStatus status) override
 
bool IsFinished (const AIEntity &owner) const override
 
bool IsLegal (const AIEntity &owner) const override
 
- Public Member Functions inherited from grail::Behavior
 Behavior (std::unique_ptr< Behavior > recoveryBehavior=nullptr)
 
 Behavior (Behavior &&)=default
 
Behavioroperator= (const Behavior &)=delete
 
Behavioroperator= (Behavior &&)=delete
 
virtual bool IsInterruptible () const
 
BehaviorStatus GetStatus () const
 GetStatus. More...
 
virtual std::unique_ptr< BehaviorGetRecoveryBehavior ()
 
virtual std::string GetName () const
 

Additional Inherited Members

- Protected Attributes inherited from grail::Behavior
std::unique_ptr< BehaviorrecoveryBehavior {nullptr}
 

Member Function Documentation

◆ Finish()

void grail::fsm::FSMBehavior::Finish ( AIEntity owner,
const BehaviorStatus  status 
)
overridevirtual

Invoked after the behavior is finished or interrupted

Parameters
owner- the entity executing this behavior

Reimplemented from grail::Behavior.

◆ IsFinished()

bool grail::fsm::FSMBehavior::IsFinished ( const AIEntity owner) const
overridevirtual
Parameters
owner- the entity executing this behavior

Reimplemented from grail::Behavior.

◆ IsLegal()

bool grail::fsm::FSMBehavior::IsLegal ( const AIEntity owner) const
overridevirtual
Parameters
owner- the entity executing this behavior
Returns
true if this behavior instance should be considered by decision making algorithms, false otherwise

Reimplemented from grail::Behavior.

◆ Start()

void grail::fsm::FSMBehavior::Start ( AIEntity owner)
overridevirtual

Invoked after the behavior is assigned to AIEntity

Parameters
owner- the entity executing this behavior

Reimplemented from grail::Behavior.

◆ Update()

void grail::fsm::FSMBehavior::Update ( AIEntity owner,
float  deltaTime 
)
overridevirtual

Invoked on each AIManager update

Parameters
owner- the entity executing this behavior

Reimplemented from grail::Behavior.


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