(C++)  1.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::Behavior Class Referenceabstract

A high-level abstraction of actions in the game. More...

#include <Behavior.hh>

Inheritance diagram for grail::Behavior:

Public Member Functions

 Behavior (const Behavior &)=default
 
 Behavior (Behavior &&)=default
 
Behavioroperator= (const Behavior &)=delete
 
Behavioroperator= (Behavior &&)=delete
 
virtual void Start (AIEntity &owner)
 
virtual void Update (AIEntity &owner, float deltaTime)=0
 
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::string GetName () const
 

Friends

class AIEntity
 
class BehaviorSequence
 

Detailed Description

A high-level abstraction of actions in the game.

Member Function Documentation

void grail::Behavior::Finish ( AIEntity owner,
const BehaviorStatus  status 
)
virtual

Invoked after the behavior is finished or interrupted

Parameters
owner- the entity executing this behavior

Reimplemented in grail::BehaviorSequence.

BehaviorStatus grail::Behavior::GetStatus ( ) const

GetStatus.

Returns
behavior status (ACTIVE, SUSPENDED, FINISHED, DELEGALIZED)
bool grail::Behavior::IsFinished ( const AIEntity owner) const
virtual
Parameters
owner- the entity executing this behavior

Reimplemented in grail::BehaviorSequence.

bool grail::Behavior::IsInterruptible ( ) const
virtual
Returns
true if this behavior's execution can be interrupted by a Reasoner

Reimplemented in grail::BehaviorSequence.

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

Reimplemented in grail::BehaviorSequence.

void grail::Behavior::Start ( AIEntity owner)
virtual

Invoked after the behavior is assigned to AIEntity

Parameters
owner- the entity executing this behavior

Reimplemented in grail::BehaviorSequence.

virtual void grail::Behavior::Update ( AIEntity owner,
float  deltaTime 
)
pure virtual

Invoked on each AIManager update

Parameters
owner- the entity executing this behavior

Implemented in grail::BehaviorSequence.


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