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

This decision will roll a dice and return true if the result is below or equal the Odds value More...

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

Public Member Functions

override bool Decide ()
 On Decide we check if the odds are in our favour More...
 
- Public Member Functions inherited from MoreMountains.Tools.AIDecision
virtual void Initialization ()
 Meant to be overridden, called when the game starts More...
 
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

int TotalChance = 10
 the total number to consider (in "5 out of 10", this would be 10) More...
 
int Odds = 4
 when rolling our dice, if the result is below the Odds, this decision will be true. In "5 out of 10", this would be 5. 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 EvaluateOdds ()
 Returns true if the Brain's Target is facing us (this will require that the Target has a Character component) More...
 
- Protected Member Functions inherited from MoreMountains.Tools.AIDecision
virtual void Awake ()
 On Awake we grab our Brain More...
 

Protected Attributes

Character _targetCharacter
 
- 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 roll a dice and return true if the result is below or equal the Odds value

Member Function Documentation

◆ Decide()

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

On Decide we check if the odds are in our favour

Returns

Implements MoreMountains.Tools.AIDecision.

◆ EvaluateOdds()

virtual bool MoreMountains.TopDownEngine.AIDecisionRandom.EvaluateOdds ( )
protectedvirtual

Returns true if the Brain's Target is facing us (this will require that the Target has a Character component)

Returns

Member Data Documentation

◆ _targetCharacter

Character MoreMountains.TopDownEngine.AIDecisionRandom._targetCharacter
protected

◆ Odds

int MoreMountains.TopDownEngine.AIDecisionRandom.Odds = 4

when rolling our dice, if the result is below the Odds, this decision will be true. In "5 out of 10", this would be 5.

◆ TotalChance

int MoreMountains.TopDownEngine.AIDecisionRandom.TotalChance = 10

the total number to consider (in "5 out of 10", this would be 10)


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