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

This decision will return true if the specified Health conditions are met. You can have it be lower, strictly lower, equal, higher or strictly higher than the specified value. More...

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

Public Types

enum  ComparisonModes {
  ComparisonModes.StrictlyLowerThan, ComparisonModes.LowerThan, ComparisonModes.Equals, ComparisonModes.GreaterThan,
  ComparisonModes.StrictlyGreaterThan
}
 the different comparison modes More...
 

Public Member Functions

override void Initialization ()
 On init we grab our Health component More...
 
override bool Decide ()
 On Decide we evaluate our current Health level More...
 
- Public Member Functions inherited from MoreMountains.Tools.AIDecision
virtual void OnEnterState ()
 Meant to be overridden, called when the Brain enters a State this Decision is in More...
 
virtual void OnExitState ()
 Meant to be overridden, called when the Brain exits a State this Decision is in More...
 

Public Attributes

ComparisonModes TrueIfHealthIs
 the comparison mode with which we'll evaluate the HealthValue More...
 
int HealthValue
 the Health value to compare to More...
 
bool OnlyOnce = true
 whether we want this comparison to be done only once or not 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 EvaluateHealth ()
 Compares our health value and returns true if the condition is met More...
 
- Protected Member Functions inherited from MoreMountains.Tools.AIDecision
virtual void Awake ()
 On Awake we grab our Brain More...
 

Protected Attributes

Health _health
 
Character _character
 
bool _once = false
 
- 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 if the specified Health conditions are met. You can have it be lower, strictly lower, equal, higher or strictly higher than the specified value.

Member Enumeration Documentation

◆ ComparisonModes

the different comparison modes

Enumerator
StrictlyLowerThan 
LowerThan 
Equals 
GreaterThan 
StrictlyGreaterThan 

Member Function Documentation

◆ Decide()

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

On Decide we evaluate our current Health level

Returns

Implements MoreMountains.Tools.AIDecision.

◆ EvaluateHealth()

virtual bool MoreMountains.TopDownEngine.AIDecisionHealth.EvaluateHealth ( )
protectedvirtual

Compares our health value and returns true if the condition is met

Returns

◆ Initialization()

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

On init we grab our Health component

Reimplemented from MoreMountains.Tools.AIDecision.

Member Data Documentation

◆ _character

Character MoreMountains.TopDownEngine.AIDecisionHealth._character
protected

◆ _health

Health MoreMountains.TopDownEngine.AIDecisionHealth._health
protected

◆ _once

bool MoreMountains.TopDownEngine.AIDecisionHealth._once = false
protected

◆ HealthValue

int MoreMountains.TopDownEngine.AIDecisionHealth.HealthValue

the Health value to compare to

◆ OnlyOnce

bool MoreMountains.TopDownEngine.AIDecisionHealth.OnlyOnce = true

whether we want this comparison to be done only once or not

◆ TrueIfHealthIs

ComparisonModes MoreMountains.TopDownEngine.AIDecisionHealth.TrueIfHealthIs

the comparison mode with which we'll evaluate the HealthValue


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