Class KaijuAgentsFarthest3
Extension methods to get the farthest object from a given position along all three axes. Any Vector2 values will be expanded via the Expand(Vector2) method.
Inheritance
Namespace: KaijuSolutions.Agents.Extensions
Syntax
public static class KaijuAgentsFarthest3
Methods
Farthest3(Component, IEnumerable<GameObject>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static GameObject Farthest3(this Component position, IEnumerable<GameObject> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| GameObject | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(Component, IEnumerable<Transform>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Transform Farthest3(this Component position, IEnumerable<Transform> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Transform | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(Component, IEnumerable<Vector3>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Vector3 Farthest3(this Component position, IEnumerable<Vector3> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Vector3 | The farthest instance from the targets to the position. Will be the starting position if the targets list is empty. |
Farthest3(GameObject, IEnumerable<GameObject>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static GameObject Farthest3(this GameObject position, IEnumerable<GameObject> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| GameObject | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(GameObject, IEnumerable<Transform>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Transform Farthest3(this GameObject position, IEnumerable<Transform> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Transform | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(GameObject, IEnumerable<Vector3>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Vector3 Farthest3(this GameObject position, IEnumerable<Vector3> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Vector3 | The farthest instance from the targets to the position. Will be the starting position if the targets list is empty. |
Farthest3(Transform, IEnumerable<GameObject>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static GameObject Farthest3(this Transform position, IEnumerable<GameObject> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| GameObject | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(Transform, IEnumerable<Transform>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Transform Farthest3(this Transform position, IEnumerable<Transform> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Transform | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(Transform, IEnumerable<Vector3>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Vector3 Farthest3(this Transform position, IEnumerable<Vector3> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Vector3 | The farthest instance from the targets to the position. Will be the starting position if the targets list is empty. |
Farthest3(Vector2, IEnumerable<GameObject>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static GameObject Farthest3(this Vector2 position, IEnumerable<GameObject> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| GameObject | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(Vector2, IEnumerable<Transform>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Transform Farthest3(this Vector2 position, IEnumerable<Transform> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Transform | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(Vector2, IEnumerable<Vector3>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Vector3 Farthest3(this Vector2 position, IEnumerable<Vector3> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Vector3 | The farthest instance from the targets to the position. Will be the starting position if the targets list is empty. |
Farthest3(Vector3, IEnumerable<GameObject>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static GameObject Farthest3(this Vector3 position, IEnumerable<GameObject> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<GameObject> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| GameObject | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(Vector3, IEnumerable<Transform>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Transform Farthest3(this Vector3 position, IEnumerable<Transform> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Transform> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Transform | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Farthest3(Vector3, IEnumerable<Vector3>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static Vector3 Farthest3(this Vector3 position, IEnumerable<Vector3> targets, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<Vector3> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| Vector3 | The farthest instance from the targets to the position. Will be the starting position if the targets list is empty. |
Farthest3<T>(Component, IEnumerable<T>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static T Farthest3<T>(this Component position, IEnumerable<T> targets, out float distance)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| T | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Type Parameters
| Name | Description |
|---|---|
| T |
Farthest3<T>(GameObject, IEnumerable<T>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static T Farthest3<T>(this GameObject position, IEnumerable<T> targets, out float distance)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| T | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Type Parameters
| Name | Description |
|---|---|
| T |
Farthest3<T>(Transform, IEnumerable<T>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static T Farthest3<T>(this Transform position, IEnumerable<T> targets, out float distance)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| T | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Type Parameters
| Name | Description |
|---|---|
| T |
Farthest3<T>(Vector2, IEnumerable<T>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static T Farthest3<T>(this Vector2 position, IEnumerable<T> targets, out float distance)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| T | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Type Parameters
| Name | Description |
|---|---|
| T |
Farthest3<T>(Vector3, IEnumerable<T>, out Single)
The farthest instance across all three axes to a position.
Declaration
public static T Farthest3<T>(this Vector3 position, IEnumerable<T> targets, out float distance)
where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to get the farthest target instance from. |
| System.Collections.Generic.IEnumerable<T> | targets | The targets to get the farthest from. |
| System.Single | distance | The distance to the farthest target. |
Returns
| Type | Description |
|---|---|
| T | The farthest instance from the targets to the position. Will be NULL if the targets list is empty. |
Type Parameters
| Name | Description |
|---|---|
| T |