Corgi Engine  v8.8
MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius Class Reference

This decision will return true if an object on its TargetLayer layermask is within its specified radius, false otherwise. It will also set the Brain's Target to that object. More...

Inheritance diagram for MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius:
MoreMountains.Tools.AIDecision

Public Member Functions

override void Initialization ()
 On init we grab our Character component More...
 
override bool Decide ()
 On Decide we check for our target 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

float Radius = 3f
 the radius to search our target in More...
 
Vector3 DetectionOriginOffset = new Vector3(0, 0, 0)
 the center of the search circle More...
 
LayerMask TargetLayer = LayerManager.PlayerLayerMask
 the layer(s) to search our target on 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 DetectTarget ()
 Returns true if a target is found within the circle More...
 
virtual void OnDrawGizmosSelected ()
 Draws gizmos for the detection circle More...
 
- Protected Member Functions inherited from MoreMountains.Tools.AIDecision
virtual void Awake ()
 On Awake we grab our Brain More...
 

Protected Attributes

Vector2 _facingDirection
 
Vector2 _raycastOrigin
 
Character _character
 
Collider2D _detectionCollider = null
 
Color _gizmoColor = Color.yellow
 
bool _init = 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 an object on its TargetLayer layermask is within its specified radius, false otherwise. It will also set the Brain's Target to that object.

Member Function Documentation

◆ Decide()

override bool MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius.Decide ( )
virtual

On Decide we check for our target

Returns

Implements MoreMountains.Tools.AIDecision.

◆ DetectTarget()

virtual bool MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius.DetectTarget ( )
protectedvirtual

Returns true if a target is found within the circle

Returns

◆ Initialization()

override void MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius.Initialization ( )
virtual

On init we grab our Character component

Reimplemented from MoreMountains.Tools.AIDecision.

◆ OnDrawGizmosSelected()

virtual void MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius.OnDrawGizmosSelected ( )
protectedvirtual

Draws gizmos for the detection circle

Member Data Documentation

◆ _character

Character MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius._character
protected

◆ _detectionCollider

Collider2D MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius._detectionCollider = null
protected

◆ _facingDirection

Vector2 MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius._facingDirection
protected

◆ _gizmoColor

Color MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius._gizmoColor = Color.yellow
protected

◆ _init

bool MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius._init = false
protected

◆ _raycastOrigin

Vector2 MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius._raycastOrigin
protected

◆ DetectionOriginOffset

Vector3 MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius.DetectionOriginOffset = new Vector3(0, 0, 0)

the center of the search circle

◆ Radius

float MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius.Radius = 3f

the radius to search our target in

◆ TargetLayer

LayerMask MoreMountains.CorgiEngine.AIDecisionDetectTargetRadius.TargetLayer = LayerManager.PlayerLayerMask

the layer(s) to search our target on


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