Grail (C++)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
A high-level abstraction of actions in the game. More...
#include <Behavior.hh>
Public Member Functions | |
Behavior (std::unique_ptr< Behavior > recoveryBehavior=nullptr) | |
Behavior (Behavior &&)=default | |
Behavior & | operator= (const Behavior &)=delete |
Behavior & | operator= (Behavior &&)=delete |
virtual void | Start (AIEntity &owner) |
virtual void | Update (AIEntity &owner, float deltaTime) |
virtual void | Finish (AIEntity &owner, const BehaviorStatus status) |
virtual bool | IsFinished (const AIEntity &owner) const |
virtual bool | IsLegal (const AIEntity &owner) const |
virtual bool | IsInterruptible () const |
BehaviorStatus | GetStatus () const |
GetStatus. More... | |
virtual std::unique_ptr< Behavior > | GetRecoveryBehavior () |
virtual std::string | GetName () const |
Protected Attributes | |
std::unique_ptr< Behavior > | recoveryBehavior {nullptr} |
Friends | |
class | AIEntity |
class | BehaviorSequence |
A high-level abstraction of actions in the game.
|
virtual |
Invoked after the behavior is finished or interrupted
owner | - the entity executing this behavior |
Reimplemented in grail::BehaviorSequence, and grail::fsm::FSMBehavior.
BehaviorStatus grail::Behavior::GetStatus | ( | ) | const |
GetStatus.
|
virtual |
owner | - the entity executing this behavior |
Reimplemented in grail::BehaviorSequence, and grail::fsm::FSMBehavior.
|
virtual |
Reimplemented in grail::BehaviorSequence.
|
virtual |
owner | - the entity executing this behavior |
Reimplemented in grail::BehaviorSequence, and grail::fsm::FSMBehavior.
|
virtual |
Invoked after the behavior is assigned to AIEntity
owner | - the entity executing this behavior |
Reimplemented in grail::BehaviorSequence, and grail::fsm::FSMBehavior.
|
virtual |
Invoked on each AIManager update
owner | - the entity executing this behavior |
Reimplemented in grail::BehaviorSequence, and grail::fsm::FSMBehavior.