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 More...
|
|
override bool | Decide () |
| On Decide we check whether we have a line of sight 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...
|
|
|
LayerMask | ObstacleLayerMask = LayerManager.ObstaclesLayerMask |
| the layermask to consider as obstacles when trying to determine whether a line of sight is present More...
|
|
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 More...
|
|
string | Label |
| a label you can set to organize your AI Decisions, not used by anything else More...
|
|
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 |
( |
| ) |
|
|
virtual |
◆ 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: