Class KaijuLeavingMovement
Base KaijuMovement class for moving away from a single target.
Inherited Members
Namespace: KaijuSolutions.Agents.Movement
Syntax
public abstract class KaijuLeavingMovement : KaijuTargetMovement
Constructors
KaijuLeavingMovement(KaijuAgent, Component, Single, Single)
Create a leaving movement for a component.
Declaration
public KaijuLeavingMovement(KaijuAgent agent, Component target, float distance = 20F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this is assigned to. |
| Component | target | The component to move away from. |
| System.Single | distance | The distance to consider this move done. |
| System.Single | weight | The weight of this KaijuMovement. |
KaijuLeavingMovement(KaijuAgent, GameObject, Single, Single)
Create a leaving movement for a GameObject.
Declaration
public KaijuLeavingMovement(KaijuAgent agent, GameObject target, float distance = 20F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this is assigned to. |
| GameObject | target | The GameObject to move away from. |
| System.Single | distance | The distance to consider this move done. |
| System.Single | weight | The weight of this KaijuMovement. |
KaijuLeavingMovement(KaijuAgent, Vector2, Single, Single)
Create a leaving movement for a Vector2.
Declaration
public KaijuLeavingMovement(KaijuAgent agent, Vector2 target, float distance = 20F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this is assigned to. |
| Vector2 | target | The vector to move away from. |
| System.Single | distance | The distance to consider this move done. |
| System.Single | weight | The weight of this KaijuMovement. |
KaijuLeavingMovement(KaijuAgent, Vector3, Single, Single)
Create a leaving movement for a Vector3.
Declaration
public KaijuLeavingMovement(KaijuAgent agent, Vector3 target, float distance = 20F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this is assigned to. |
| Vector3 | target | The vector to move away from. |
| System.Single | distance | The distance to consider this move done. |
| System.Single | weight | The weight of this KaijuMovement. |
Fields
DefaultDistance
The default Distance of leaving movements.
Declaration
public const float DefaultDistance = 20F
Field Value
| Type | Description |
|---|---|
| System.Single |
Methods
Done()
Determine if the KaijuMovement is done or not.
Declaration
public override bool Done()
Returns
| Type | Description |
|---|---|
| System.Boolean | If the KaijuMovement is done or not. |