This AI Action will let an agent with a CharacterOrientation2D ability face its target.
More...
|
| override void | Initialization () |
| | On init we grab our CharacterOrientation2D ability.
|
| override void | OnEnterState () |
| | Describes what happens when the brain enters the state this action is in. Meant to be overridden.
|
| override void | OnExitState () |
| | Describes what happens when the brain exits the state this action is in. Meant to be overridden.
|
| override void | PerformAction () |
| | On PerformAction we face our target.
|
| void | PerformAction () |
|
| virtual void | FaceTarget () |
| | Makes the orientation 2D ability face towards the brain target.
|
| virtual void | Awake () |
| | On Awake we grab our AIBrain.
|
This AI Action will let an agent with a CharacterOrientation2D ability face its target.
◆ Modes
the possible modes you can ask the AI to face (should - usually - match your CharacterOrientation2D settings)
| Enumerator |
|---|
| LeftRight | |
| FacingDirections | |
◆ FaceTarget()
| virtual void MoreMountains.TopDownEngine.AIActionFaceTowardsTarget2D.FaceTarget |
( |
| ) |
|
|
protectedvirtual |
Makes the orientation 2D ability face towards the brain target.
◆ Initialization()
| override void MoreMountains.TopDownEngine.AIActionFaceTowardsTarget2D.Initialization |
( |
| ) |
|
|
virtual |
◆ OnEnterState()
| override void MoreMountains.TopDownEngine.AIActionFaceTowardsTarget2D.OnEnterState |
( |
| ) |
|
|
virtual |
Describes what happens when the brain enters the state this action is in. Meant to be overridden.
Reimplemented from MoreMountains.Tools.AIAction.
◆ OnExitState()
| override void MoreMountains.TopDownEngine.AIActionFaceTowardsTarget2D.OnExitState |
( |
| ) |
|
|
virtual |
Describes what happens when the brain exits the state this action is in. Meant to be overridden.
Reimplemented from MoreMountains.Tools.AIAction.
◆ PerformAction()
| override void MoreMountains.TopDownEngine.AIActionFaceTowardsTarget2D.PerformAction |
( |
| ) |
|
On PerformAction we face our target.
◆ _chacterOrientation2DNotNull
| bool MoreMountains.TopDownEngine.AIActionFaceTowardsTarget2D._chacterOrientation2DNotNull |
|
protected |
◆ _characterOrientation2D
◆ _distance
| Vector2 MoreMountains.TopDownEngine.AIActionFaceTowardsTarget2D._distance |
|
protected |
◆ _initialFacingMode
◆ _newFacingDirection
◆ _targetPosition
| Vector3 MoreMountains.TopDownEngine.AIActionFaceTowardsTarget2D._targetPosition |
|
protected |
◆ Mode
The documentation for this class was generated from the following file: