Grail (C#)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Grail.Core.Behavior Class Reference

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

Inheritance diagram for Grail.Core.Behavior:
Collaboration diagram for Grail.Core.Behavior:

Public Member Functions

 Behavior (Behavior recoveryBehavior=null)
 
virtual void Start (AIEntity owner)
 
virtual void Update (AIEntity owner, float deltaTime)
 
virtual void Finish (AIEntity owner, in BehaviorStatus status)
 
virtual bool IsFinished (AIEntity owner)
 
virtual bool IsLegal (AIEntity owner)
 
virtual bool IsInterruptible ()
 

Public Attributes

virtual Behavior RecoveryBehavior => recoveryBehavior
 

Protected Attributes

Behavior recoveryBehavior
 

Properties

BehaviorStatus Status [get, set]
 

Detailed Description

A high-level abstraction of actions in the game.

Member Function Documentation

◆ Finish()

virtual void Grail.Core.Behavior.Finish ( AIEntity  owner,
in BehaviorStatus  status 
)
inlinevirtual

Invoked after the behavior is finished or interrupted

Parameters
owner- the entity executing this behavior

Reimplemented in Grail.Core.BehaviorSequence, and Grail.FSM.FSMBehavior.

◆ IsFinished()

virtual bool Grail.Core.Behavior.IsFinished ( AIEntity  owner)
inlinevirtual
Parameters
owner- the entity executing this behavior

Reimplemented in Grail.Core.BehaviorSequence, and Grail.FSM.FSMBehavior.

◆ IsInterruptible()

virtual bool Grail.Core.Behavior.IsInterruptible ( )
inlinevirtual
Returns
true if the execution of this behavior is possible to be interrupted by a Reasoner.
It will be assigned the SUSPENDED status unless the reasoner decides to finish the SUSPENDED behavior immediately or it becomes immediately DELEGALIZED.

Reimplemented in Grail.Core.BehaviorSequence.

◆ IsLegal()

virtual bool Grail.Core.Behavior.IsLegal ( AIEntity  owner)
inlinevirtual
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.Core.BehaviorSequence.

◆ Start()

virtual void Grail.Core.Behavior.Start ( AIEntity  owner)
inlinevirtual

Invoked after the behavior is assigned to AIEntity

Parameters
owner- the entity executing this behavior

Reimplemented in Grail.FSM.FSMBehavior, and Grail.Core.BehaviorSequence.

◆ Update()

virtual void Grail.Core.Behavior.Update ( AIEntity  owner,
float  deltaTime 
)
inlinevirtual

Invoked on each AIManager update

Parameters
owner- the entity executing this behavior

Reimplemented in Grail.FSM.FSMBehavior, and Grail.Core.BehaviorSequence.


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