This decision returns true if there's no obstacle in a straight line between the agent and the brain's target, in 2D.
More...
|
| override void | Initialization () |
| | On init we grab our collider.
|
| override bool | Decide () |
| | On Decide we check whether we have a line of sight.
|
| 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.
|
|
| LayerMask | ObstacleLayerMask = LayerManager.ObstaclesLayerMask |
| | the layermask to consider as obstacles when trying to determine whether a line of sight is present
|
| Vector3 | LineOfSightOffset = new Vector3(0, 0, 0) |
| | the offset to apply (from the collider's center) when casting a ray from the agent to its target
|
| string | Label |
| | a label you can set to organize your AI Decisions, not used by anything else
|
|
| virtual bool | CheckLineOfSight () |
| | Checks whether there are obstacles between the agent and the target.
|
| virtual void | Awake () |
| | On Awake we grab our Brain.
|
This decision returns true if there's no obstacle in a straight line between the agent and the brain's target, in 2D.
◆ CheckLineOfSight()
| virtual bool MoreMountains.TopDownEngine.AIDecisionLineOfSightToTarget2D.CheckLineOfSight |
( |
| ) |
|
|
protectedvirtual |
Checks whether there are obstacles between the agent and the target.
- Returns
◆ Decide()
| override bool MoreMountains.TopDownEngine.AIDecisionLineOfSightToTarget2D.Decide |
( |
| ) |
|
On Decide we check whether we have a line of sight.
- Returns
◆ Initialization()
| override void MoreMountains.TopDownEngine.AIDecisionLineOfSightToTarget2D.Initialization |
( |
| ) |
|
|
virtual |
◆ _collider
| Collider2D MoreMountains.TopDownEngine.AIDecisionLineOfSightToTarget2D._collider |
|
protected |
◆ _directionToTarget
| Vector2 MoreMountains.TopDownEngine.AIDecisionLineOfSightToTarget2D._directionToTarget |
|
protected |
◆ _raycastOrigin
| Vector2 MoreMountains.TopDownEngine.AIDecisionLineOfSightToTarget2D._raycastOrigin |
|
protected |
◆ LineOfSightOffset
| Vector3 MoreMountains.TopDownEngine.AIDecisionLineOfSightToTarget2D.LineOfSightOffset = new Vector3(0, 0, 0) |
the offset to apply (from the collider's center) when casting a ray from the agent to its target
◆ ObstacleLayerMask
| LayerMask MoreMountains.TopDownEngine.AIDecisionLineOfSightToTarget2D.ObstacleLayerMask = LayerManager.ObstaclesLayerMask |
the layermask to consider as obstacles when trying to determine whether a line of sight is present
The documentation for this class was generated from the following file: