Class KaijuAgentsFlee
Standalone flee steering extension methods.
Inheritance
Namespace: KaijuSolutions.Agents.Extensions
Syntax
public static class KaijuAgentsFlee
Methods
Flee(Component, Component, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Component position, Component target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The current position of the instance to calculate the movement for. |
| Component | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Component, GameObject, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Component position, GameObject target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The current position of the instance to calculate the movement for. |
| GameObject | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Component, Transform, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Component position, Transform target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The current position of the instance to calculate the movement for. |
| Transform | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Component, Vector2, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Component position, Vector2 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The current position of the instance to calculate the movement for. |
| Vector2 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Component, Vector3, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Component position, Vector3 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The current position of the instance to calculate the movement for. |
| Vector3 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(GameObject, Component, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this GameObject position, Component target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The current position of the instance to calculate the movement for. |
| Component | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(GameObject, GameObject, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this GameObject position, GameObject target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The current position of the instance to calculate the movement for. |
| GameObject | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(GameObject, Transform, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this GameObject position, Transform target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The current position of the instance to calculate the movement for. |
| Transform | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(GameObject, Vector2, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this GameObject position, Vector2 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The current position of the instance to calculate the movement for. |
| Vector2 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(GameObject, Vector3, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this GameObject position, Vector3 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The current position of the instance to calculate the movement for. |
| Vector3 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Transform, Component, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Transform position, Component target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The current position of the instance to calculate the movement for. |
| Component | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Transform, GameObject, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Transform position, GameObject target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The current position of the instance to calculate the movement for. |
| GameObject | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Transform, Transform, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Transform position, Transform target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The current position of the instance to calculate the movement for. |
| Transform | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Transform, Vector2, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Transform position, Vector2 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The current position of the instance to calculate the movement for. |
| Vector2 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Transform, Vector3, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Transform position, Vector3 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The current position of the instance to calculate the movement for. |
| Vector3 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector2, Component, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector2 position, Component target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The current position of the instance to calculate the movement for. |
| Component | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector2, GameObject, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector2 position, GameObject target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The current position of the instance to calculate the movement for. |
| GameObject | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector2, Transform, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector2 position, Transform target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The current position of the instance to calculate the movement for. |
| Transform | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector2, Vector2, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector2 position, Vector2 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The current position of the instance to calculate the movement for. |
| Vector2 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector2, Vector3, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector2 position, Vector3 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The current position of the instance to calculate the movement for. |
| Vector3 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector3, Component, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector3 position, Component target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The current position of the instance to calculate the movement for. |
| Component | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector3, GameObject, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector3 position, GameObject target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The current position of the instance to calculate the movement for. |
| GameObject | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector3, Transform, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector3 position, Transform target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The current position of the instance to calculate the movement for. |
| Transform | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector3, Vector2, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector3 position, Vector2 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The current position of the instance to calculate the movement for. |
| Vector2 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |
Flee(Vector3, Vector3, Single)
Calculate a flee behaviour.
Declaration
public static Vector2 Flee(this Vector3 position, Vector3 target, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The current position of the instance to calculate the movement for. |
| Vector3 | target | The target to move in relation to. |
| System.Single | speed | The maximum speed that the position can update at. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated movement. |