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...
|
| override void | Initialization () |
| | On init we grab our Character component.
|
| override bool | Decide () |
| | On Decide we check for our target.
|
| 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.
|
|
| float | Radius = 3f |
| | the radius to search our target in
|
| Vector3 | DetectionOriginOffset = new Vector3(0, 0, 0) |
| | the offset to apply (from the collider's center)
|
| LayerMask | TargetLayerMask |
| | the layer(s) to search our target on
|
| LayerMask | ObstacleMask = LayerManager.ObstaclesLayerMask |
| | the layer(s) to block the sight
|
| float | TargetCheckFrequency = 1f |
| | the frequency (in seconds) at which to check for obstacles
|
| bool | CanTargetSelf = false |
| | if this is true, this AI will be able to consider itself (or its children) a target
|
| int | OverlapMaximum = 10 |
| | the maximum amount of targets the overlap detection can acquire
|
| string | Label |
| | a label you can set to organize your AI Decisions, not used by anything else
|
|
| virtual bool | DetectTarget () |
| | Returns true if a target is found within the circle.
|
| virtual void | OnDrawGizmosSelected () |
| | Draws gizmos for the detection circle.
|
| virtual void | Awake () |
| | On Awake we grab our Brain.
|
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.
◆ Decide()
| override bool MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.Decide |
( |
| ) |
|
On Decide we check for our target.
- Returns
◆ DetectTarget()
| virtual bool MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.DetectTarget |
( |
| ) |
|
|
protectedvirtual |
Returns true if a target is found within the circle.
- Returns
◆ Initialization()
| override void MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.Initialization |
( |
| ) |
|
|
virtual |
◆ OnDrawGizmosSelected()
| virtual void MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.OnDrawGizmosSelected |
( |
| ) |
|
|
protectedvirtual |
Draws gizmos for the detection circle.
◆ _character
| Character MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._character |
|
protected |
◆ _collider
| Collider MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._collider |
|
protected |
◆ _gizmoColor
| Color MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._gizmoColor = Color.yellow |
|
protected |
◆ _hits
| Collider [] MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._hits |
|
protected |
◆ _init
| bool MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._init = false |
|
protected |
◆ _lastReturnValue
| bool MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._lastReturnValue = false |
|
protected |
◆ _lastTargetCheckTimestamp
| float MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._lastTargetCheckTimestamp = 0f |
|
protected |
◆ _potentialTargets
| List<Transform> MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._potentialTargets |
|
protected |
◆ _raycastDirection
| Vector3 MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._raycastDirection |
|
protected |
◆ _raycastOrigin
| Vector3 MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D._raycastOrigin |
|
protected |
◆ CanTargetSelf
| bool MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.CanTargetSelf = false |
if this is true, this AI will be able to consider itself (or its children) a target
◆ DetectionOriginOffset
| Vector3 MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.DetectionOriginOffset = new Vector3(0, 0, 0) |
the offset to apply (from the collider's center)
◆ ObstacleMask
| LayerMask MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.ObstacleMask = LayerManager.ObstaclesLayerMask |
the layer(s) to block the sight
◆ OverlapMaximum
| int MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.OverlapMaximum = 10 |
the maximum amount of targets the overlap detection can acquire
◆ Radius
| float MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.Radius = 3f |
the radius to search our target in
◆ TargetCheckFrequency
| float MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.TargetCheckFrequency = 1f |
the frequency (in seconds) at which to check for obstacles
◆ TargetLayerMask
| LayerMask MoreMountains.TopDownEngine.AIDecisionDetectTargetRadius3D.TargetLayerMask |
the layer(s) to search our target on
The documentation for this class was generated from the following file: