TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.TopDownEngine.AIDecisionDetectTargetConeOfVision2D Class Reference

This Decision will return true if its MMConeOfVision has detected at least one target, and will set it as the Brain's target. More...

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

Public Member Functions

override void Initialization ()
 On Init we grab our MMConeOfVision.
override bool Decide ()
 On Decide we look for a target.
Public Member Functions inherited from MoreMountains.Tools.AIDecision
bool Decide ()
 Decide will be performed every frame while the Brain is in a state this Decision is in. Should return true or false, which will then determine the transition's outcome.
virtual void OnEnterState ()
 Meant to be overridden, called when the Brain enters a State this Decision is in.
virtual void OnExitState ()
 Meant to be overridden, called when the Brain exits a State this Decision is in.

Public Attributes

bool SetTargetToNullIfNoneIsFound = true
 if this is true, this decision will set the AI Brain's Target to null if no target is found
MMConeOfVision2D TargetConeOfVision2D
 the cone of vision 2D to rotate
Public Attributes inherited from MoreMountains.Tools.AIDecision
string Label
 a label you can set to organize your AI Decisions, not used by anything else

Protected Member Functions

virtual bool DetectTarget ()
 If the MMConeOfVision has at least one target, it becomes our new brain target and this decision is true, otherwise it's false.
Protected Member Functions inherited from MoreMountains.Tools.AIDecision
virtual void Awake ()
 On Awake we grab our Brain.

Additional Inherited Members

Protected Attributes inherited from MoreMountains.Tools.AIDecision
AIBrain _brain
Properties inherited from MoreMountains.Tools.AIDecision
virtual bool DecisionInProgress [get, set]

Detailed Description

This Decision will return true if its MMConeOfVision has detected at least one target, and will set it as the Brain's target.

Member Function Documentation

◆ Decide()

override bool MoreMountains.TopDownEngine.AIDecisionDetectTargetConeOfVision2D.Decide ( )

On Decide we look for a target.

Returns

◆ DetectTarget()

virtual bool MoreMountains.TopDownEngine.AIDecisionDetectTargetConeOfVision2D.DetectTarget ( )
protectedvirtual

If the MMConeOfVision has at least one target, it becomes our new brain target and this decision is true, otherwise it's false.

Returns

◆ Initialization()

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

On Init we grab our MMConeOfVision.

Reimplemented from MoreMountains.Tools.AIDecision.

Member Data Documentation

◆ SetTargetToNullIfNoneIsFound

bool MoreMountains.TopDownEngine.AIDecisionDetectTargetConeOfVision2D.SetTargetToNullIfNoneIsFound = true

if this is true, this decision will set the AI Brain's Target to null if no target is found

◆ TargetConeOfVision2D

MMConeOfVision2D MoreMountains.TopDownEngine.AIDecisionDetectTargetConeOfVision2D.TargetConeOfVision2D

the cone of vision 2D to rotate


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