Class KaijuAgentsAngleSorter
Comparer class to sort by angle in degrees from a position towards a target around the global Y axis. Used in the extension methods found in KaijuAgentsSortAngle.
Inheritance
Implements
Namespace: KaijuSolutions.Agents.Extensions
Syntax
public sealed class KaijuAgentsAngleSorter : IComparer<Vector2>, IComparer<Vector3>, IComparer<Transform>, IComparer<Component>, IComparer<GameObject>
Constructors
KaijuAgentsAngleSorter()
Create the sorter.
Declaration
public KaijuAgentsAngleSorter()
KaijuAgentsAngleSorter(Component, Component, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Component position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Component, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Component position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Component, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Component position, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against with its forward being used for the direction. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Component, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Component position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Component, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Component position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Component, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Component position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(GameObject, Component, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(GameObject position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(GameObject, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(GameObject position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(GameObject position, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against with its forward being used for the direction. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(GameObject, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(GameObject position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(GameObject, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(GameObject position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(GameObject, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(GameObject position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Transform, Component, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Transform position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Transform, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Transform position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Transform, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Transform position, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against with its forward being used for the direction. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Transform, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Transform position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Transform, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Transform position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Transform, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Transform position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector2, Component, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector2 position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector2, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector2 position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector2, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector2 position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector2, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector2 position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector2, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector2 position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector3, Component, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector3 position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector3, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector3 position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector3, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector3 position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector3, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector3 position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
KaijuAgentsAngleSorter(Vector3, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Create the sorter.
Declaration
public KaijuAgentsAngleSorter(Vector3 position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Fields
Farthest
How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance.
Declaration
public bool? Farthest
Field Value
| Type | Description |
|---|---|
| System.Nullable<System.Boolean> |
Forward
The forward direction to compare with.
Declaration
public Vector2 Forward
Field Value
| Type | Description |
|---|---|
| Vector2 |
Mode
How to handle sorting.
Declaration
public KaijuAngleSortMode Mode
Field Value
| Type | Description |
|---|---|
| KaijuAngleSortMode |
Position
The position to compare against.
Declaration
public Vector2 Position
Field Value
| Type | Description |
|---|---|
| Vector2 |
Properties
Position3
The position to compare against.
Declaration
public Vector3 Position3 { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
PositionComponent
The position to compare against. The forward direction will be taken from this as well.
Declaration
public Component PositionComponent { set; }
Property Value
| Type | Description |
|---|---|
| Component |
PositionGameObject
The position to compare against. The forward direction will be taken from this as well.
Declaration
public GameObject PositionGameObject { set; }
Property Value
| Type | Description |
|---|---|
| GameObject |
PositionTransform
The position to compare against. The forward direction will be taken from this as well.
Declaration
public Transform PositionTransform { set; }
Property Value
| Type | Description |
|---|---|
| Transform |
Methods
Compare(Component, Component)
Compare the two instances.
Declaration
public int Compare(Component x, Component y)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | x | The first instance. |
| Component | y | The second instance. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first. |
Compare(GameObject, GameObject)
Compare the two instances.
Declaration
public int Compare(GameObject x, GameObject y)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | x | The first instance. |
| GameObject | y | The second instance. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first. |
Compare(Transform, Transform)
Compare the two instances.
Declaration
public int Compare(Transform x, Transform y)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | x | The first instance. |
| Transform | y | The second instance. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first. |
Compare(Vector2, Vector2)
Compare the two instances.
Declaration
public int Compare(Vector2 x, Vector2 y)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | x | The first instance. |
| Vector2 | y | The second instance. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first. |
Compare(Vector3, Vector3)
Compare the two instances.
Declaration
public int Compare(Vector3 x, Vector3 y)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | x | The first instance. |
| Vector3 | y | The second instance. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first. |
CompareAngle(Vector2, Vector2, Vector2, Vector2, KaijuAngleSortMode)
Compare the two instances.
Declaration
public static int CompareAngle(Vector2 position, Vector2 forward, Vector2 x, Vector2 y, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| Vector2 | x | The first instance. |
| Vector2 | y | The second instance. |
| KaijuAngleSortMode | mode | How to handle sorting. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Less than zero if the first instance comes first, zero if they are equal, or greater than zero if the second comes first. |
Set(Component, Component, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Component position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Component, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Component position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Component, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Component position, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against with its forward being used for the direction. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Component, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Component position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Component, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Component position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Component, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Component position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(GameObject, Component, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(GameObject position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(GameObject, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(GameObject position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(GameObject position, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against with its forward being used for the direction. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(GameObject, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(GameObject position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(GameObject, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(GameObject position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(GameObject, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(GameObject position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Transform, Component, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Transform position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Transform, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Transform position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Transform, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Transform position, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against with its forward being used for the direction. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Transform, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Transform position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Transform, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Transform position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Transform, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Transform position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector2, Component, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector2 position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector2, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector2 position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector2, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector2 position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector2, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector2 position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector2, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector2 position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector3, Component, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector3 position, Component forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| Component | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector3, GameObject, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector3 position, GameObject forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| GameObject | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector3, Transform, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector3 position, Transform forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| Transform | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector3, Vector2, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector3 position, Vector2 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| Vector2 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Set(Vector3, Vector3, KaijuAngleSortMode, Nullable<Boolean>)
Set values for the sorter.
Declaration
public void Set(Vector3 position, Vector3 forward, KaijuAngleSortMode mode = KaijuAngleSortMode.Magnitude, bool? farthest = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to compare against. |
| Vector3 | forward | The forward direction to compare with. |
| KaijuAngleSortMode | mode | How to handle sorting. |
| System.Nullable<System.Boolean> | farthest | How to handle breaking ties by distance. NULL means no tie breaking, false for nearest distance, and true for farthest distance. |
Operators
Implicit(KaijuAgentsAngleSorter to Nullable<Vector2>)
Implicit conversion to a nullable Vector2 from the position.
Declaration
public static implicit operator Vector2? (KaijuAgentsAngleSorter s)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgentsAngleSorter | s | The sorter. |
Returns
| Type | Description |
|---|---|
| System.Nullable<Vector2> | The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsAngleSorter.ToString method. |
Implicit(KaijuAgentsAngleSorter to Nullable<Vector3>)
Implicit conversion to a nullable Vector3 from the position.
Declaration
public static implicit operator Vector3? (KaijuAgentsAngleSorter s)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgentsAngleSorter | s | The sorter. |
Returns
| Type | Description |
|---|---|
| System.Nullable<Vector3> | The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsAngleSorter.ToString method. |
Implicit(KaijuAgentsAngleSorter to String)
Implicit conversion to a string.
Declaration
public static implicit operator string (KaijuAgentsAngleSorter s)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgentsAngleSorter | s | The sorter. |
Returns
| Type | Description |
|---|---|
| System.String | The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsAngleSorter.ToString method. |
Implicit(KaijuAgentsAngleSorter to Vector2)
Implicit conversion to a Vector2 from the position.
Declaration
public static implicit operator Vector2(KaijuAgentsAngleSorter s)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgentsAngleSorter | s | The sorter. |
Returns
| Type | Description |
|---|---|
| Vector2 | The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsAngleSorter.ToString method. |
Implicit(KaijuAgentsAngleSorter to Vector3)
Implicit conversion to a Vector3 from the position.
Declaration
public static implicit operator Vector3(KaijuAgentsAngleSorter s)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgentsAngleSorter | s | The sorter. |
Returns
| Type | Description |
|---|---|
| Vector3 | The string from the KaijuSolutions.Agents.Extensions.KaijuAgentsAngleSorter.ToString method. |