TopDown Engine  v3.6
MoreMountains.TopDownEngine.AIDecisionTimeInState Class Reference

This decision will return true after the specified duration, picked randomly between the min and max values (in seconds) has passed since the Brain has been in the state this decision is in. Use it to do something X seconds after having done something else. More...

Inheritance diagram for MoreMountains.TopDownEngine.AIDecisionTimeInState:
MoreMountains.Tools.AIDecision

Public Member Functions

override bool Decide ()
 On Decide we evaluate our time More...
 
override void Initialization ()
 On init we randomize our next delay More...
 
override void OnEnterState ()
 On enter state we randomize our next delay More...
 
- Public Member Functions inherited from MoreMountains.Tools.AIDecision
virtual void OnExitState ()
 Meant to be overridden, called when the Brain exits a State this Decision is in More...
 

Public Attributes

float AfterTimeMin = 2f
 The minimum duration, in seconds, after which to return true. More...
 
float AfterTimeMax = 2f
 The maximum duration, in seconds, after which to return true. More...
 
- Public Attributes inherited from MoreMountains.Tools.AIDecision
string Label
 a label you can set to organize your AI Decisions, not used by anything else More...
 

Protected Member Functions

virtual bool EvaluateTime ()
 Returns true if enough time has passed since we entered the current state More...
 
virtual void RandomizeTime ()
 On randomize time we randomize our next delay More...
 
- Protected Member Functions inherited from MoreMountains.Tools.AIDecision
virtual void Awake ()
 On Awake we grab our Brain More...
 

Protected Attributes

float _randomTime
 
- Protected Attributes inherited from MoreMountains.Tools.AIDecision
AIBrain _brain
 

Additional Inherited Members

- Properties inherited from MoreMountains.Tools.AIDecision
virtual bool DecisionInProgress [get, set]
 

Detailed Description

This decision will return true after the specified duration, picked randomly between the min and max values (in seconds) has passed since the Brain has been in the state this decision is in. Use it to do something X seconds after having done something else.

Member Function Documentation

◆ Decide()

override bool MoreMountains.TopDownEngine.AIDecisionTimeInState.Decide ( )
virtual

On Decide we evaluate our time

Returns

Implements MoreMountains.Tools.AIDecision.

◆ EvaluateTime()

virtual bool MoreMountains.TopDownEngine.AIDecisionTimeInState.EvaluateTime ( )
protectedvirtual

Returns true if enough time has passed since we entered the current state

Returns

◆ Initialization()

override void MoreMountains.TopDownEngine.AIDecisionTimeInState.Initialization ( )
virtual

On init we randomize our next delay

Reimplemented from MoreMountains.Tools.AIDecision.

◆ OnEnterState()

override void MoreMountains.TopDownEngine.AIDecisionTimeInState.OnEnterState ( )
virtual

On enter state we randomize our next delay

Reimplemented from MoreMountains.Tools.AIDecision.

◆ RandomizeTime()

virtual void MoreMountains.TopDownEngine.AIDecisionTimeInState.RandomizeTime ( )
protectedvirtual

On randomize time we randomize our next delay

Member Data Documentation

◆ _randomTime

float MoreMountains.TopDownEngine.AIDecisionTimeInState._randomTime
protected

◆ AfterTimeMax

float MoreMountains.TopDownEngine.AIDecisionTimeInState.AfterTimeMax = 2f

The maximum duration, in seconds, after which to return true.

◆ AfterTimeMin

float MoreMountains.TopDownEngine.AIDecisionTimeInState.AfterTimeMin = 2f

The minimum duration, in seconds, after which to return true.


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