The BehaviorSequence class - specialized Behavior executing sequence of provided subbehaviors one by one.
More...
#include <BehaviorSequence.hh>
The BehaviorSequence class - specialized Behavior executing sequence of provided subbehaviors one by one.
◆ BehaviorSequence()
grail::BehaviorSequence::BehaviorSequence |
( |
std::size_t |
expectedSequenceSize = 3 | ) |
|
BehaviorSequence.
- Parameters
-
expectedSequenceSize | - required to preallocate memory in container, by default 3 |
◆ AddBehavior()
template<typename BehaviorType , typename... ConstructorArguments>
void grail::BehaviorSequence::AddBehavior |
( |
ConstructorArguments &&... |
constructorArguments | ) |
|
|
inline |
AddBehavior - method emplacing new behavior in the sequence.
- Parameters
-
constructorArguments | - forwarded BehaviorType constructor arguments |
◆ Finish()
void grail::BehaviorSequence::Finish |
( |
AIEntity & |
owner, |
|
|
const BehaviorStatus |
status |
|
) |
| |
|
finaloverridevirtual |
Invoked after the behavior is finished or interrupted
- Parameters
-
owner | - the entity executing this behavior |
Reimplemented from grail::Behavior.
◆ IsFinished()
bool grail::BehaviorSequence::IsFinished |
( |
const AIEntity & |
owner | ) |
const |
|
finaloverridevirtual |
- Parameters
-
owner | - the entity executing this behavior |
Reimplemented from grail::Behavior.
◆ IsInterruptible()
bool grail::BehaviorSequence::IsInterruptible |
( |
| ) |
const |
|
overridevirtual |
IsInterruptible.
- Returns
- true if current subbehavior is interruptible, false otherwise
Reimplemented from grail::Behavior.
◆ IsLegal()
bool grail::BehaviorSequence::IsLegal |
( |
const AIEntity & |
owner | ) |
const |
|
overridevirtual |
IsLegal.
- Parameters
-
- Returns
- true if current subbehavior is legal, false otherwise
Reimplemented from grail::Behavior.
◆ Start()
void grail::BehaviorSequence::Start |
( |
AIEntity & |
owner | ) |
|
|
finaloverridevirtual |
Invoked after the behavior is assigned to AIEntity
- Parameters
-
owner | - the entity executing this behavior |
Reimplemented from grail::Behavior.
◆ Update()
void grail::BehaviorSequence::Update |
( |
AIEntity & |
owner, |
|
|
float |
deltaTime |
|
) |
| |
|
finaloverridevirtual |
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: