Crystal AI  1.0.0
Crystal.BehaviourTransition Class Reference

BehaviourTransition is an T:Crystal.IAction which when executed triggers the selection of an T:Crystal.IAction using a linked T:Crystal.IBehaviour. More...

Inheritance diagram for Crystal.BehaviourTransition:
Crystal.ActionBase Crystal.ITransition Crystal.IAction Crystal.IAiPrototype< IAction >

Classes

class  BehaviourDoesNotExistException
 
class  BehaviourNullException
 

Public Member Functions

IAction Select (IContext context)
 Triggers the action selection mechanism of the associated T:Crystal.IBehaviour or T:Crystal.IUtilityAi. More...
 
override IAction Clone ()
 Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state! More...
 
 BehaviourTransition (Behaviour behaviour)
 Initializes a new instance of the BehaviourTransition class. More...
 
 BehaviourTransition (string nameId, string behaviourId, IBehaviourCollection collection)
 Initializes a new instance of the BehaviourTransition class. More...
 
- Public Member Functions inherited from Crystal.IAction
void Execute (IContext context)
 Executes the AI Action. More...
 
- Public Member Functions inherited from Crystal.IAiPrototype< IAction >
Clone ()
 Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state! More...
 

Properties

Behaviour Behaviour [get, set]
 The T:Crystal.IBehaviour used for T:Crystal.IAction selection when this action is selected. More...
 
- Properties inherited from Crystal.IAction
string NameId [get]
 A unique identifier for this action. More...
 
float ElapsedTime [get]
 The Time that this action has been running for since it has been started in seconds. More...
 
float Cooldown [get, set]
 The required cool-down time, in seconds, needed before this action executes again. More...
 
bool InCooldown [get]
 This returns true if the cool-down time for this action has not yet elapsed. More...
 
ActionStatus ActionStatus [get]
 Gets the action status. More...
 

Detailed Description

BehaviourTransition is an T:Crystal.IAction which when executed triggers the selection of an T:Crystal.IAction using a linked T:Crystal.IBehaviour.

See also
T:Crystal.ActionBase, T:Crystal.ITransition

Constructor & Destructor Documentation

Crystal.BehaviourTransition.BehaviourTransition ( Behaviour  behaviour)
inline

Initializes a new instance of the BehaviourTransition class.

Parameters
behaviourThe behaviour.
Exceptions
Crystal.BehaviourTransition.BehaviourNullException
Crystal.BehaviourTransition.BehaviourTransition ( string  nameId,
string  behaviourId,
IBehaviourCollection  collection 
)
inline

Initializes a new instance of the BehaviourTransition class.

Parameters
nameIdThe name identifier.
behaviourIdThe behaviour identifier.
collectionThe collection.
Exceptions
Crystal.ActionBase.NameIdEmptyOrNullException

Member Function Documentation

override IAction Crystal.BehaviourTransition.Clone ( )
inline

Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state!

Returns
IAction Crystal.BehaviourTransition.Select ( IContext  context)
inline

Triggers the action selection mechanism of the associated T:Crystal.IBehaviour or T:Crystal.IUtilityAi.

Parameters
contextThe context.
Returns

Implements Crystal.ITransition.

Property Documentation

Behaviour Crystal.BehaviourTransition.Behaviour
getset

The T:Crystal.IBehaviour used for T:Crystal.IAction selection when this action is selected.

Exceptions
Crystal.BehaviourTransition.BehaviourDoesNotExistException

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