A class in Root.Township, Alta.Intelligence.
Action where the agent leaps at its target with set velocity and gravity, finishing when it lands. Tells an IJumpAttacker agent it is jumping.
Constructors
| Member | What it is |
|---|
ActiveJumpAt() | Creates an ActiveJumpAt with default values. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private float gravity | The walker's gravity multiplier before the jump, restored after. |
private IJumpAttacker jumpAttacker | The agent as an IJumpAttacker, or null. |
private Quaternion targetRotation | Flat rotation towards the target, held during the jump. |
private bool wasJumping | Whether the agent has left the ground yet. |
Methods
| Member | What it is |
|---|
override void Update(bool hasTarget) | Keeps facing the target and finishes once the agent touches ground after being in the air. |
protected override void OnStart() | Launches the agent at the target, lowers gravity, faces it and sets the action's duration. |
1 private and internal method
| Member | What it is |
|---|
private void HandleFinished(IActiveAction active) | Restores walker power and gravity, clears facing and tells the jump attacker the jump is over. |