Class KaijuApproachingMovement
Base KaijuMovement class for moving towards a single target.
Inheritance
Inherited Members
Namespace: KaijuSolutions.Agents.Movement
Syntax
public abstract class KaijuApproachingMovement : KaijuTargetMovement
Constructors
KaijuApproachingMovement(KaijuAgent, Component, Single, Single)
Create an approaching movement for a component.
Declaration
public KaijuApproachingMovement(KaijuAgent agent, Component target, float distance = 0.1F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this is assigned to. |
| Component | target | The component to move towards. |
| System.Single | distance | The distance to consider this move done. |
| System.Single | weight | The weight of this KaijuMovement. |
KaijuApproachingMovement(KaijuAgent, GameObject, Single, Single)
Create an approaching movement for a GameObject.
Declaration
public KaijuApproachingMovement(KaijuAgent agent, GameObject target, float distance = 0.1F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this is assigned to. |
| GameObject | target | The GameObject to move towards. |
| System.Single | distance | The distance to consider this move done. |
| System.Single | weight | The weight of this KaijuMovement. |
KaijuApproachingMovement(KaijuAgent, Vector2, Single, Single)
Create an approaching movement for a Vector2.
Declaration
public KaijuApproachingMovement(KaijuAgent agent, Vector2 target, float distance = 0.1F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this is assigned to. |
| Vector2 | target | The vector to move towards. |
| System.Single | distance | The distance to consider this move done. |
| System.Single | weight | The weight of this KaijuMovement. |
KaijuApproachingMovement(KaijuAgent, Vector3, Single, Single)
Create an approaching movement for a Vector3.
Declaration
public KaijuApproachingMovement(KaijuAgent agent, Vector3 target, float distance = 0.1F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this is assigned to. |
| Vector3 | target | The vector to move towards. |
| System.Single | distance | The distance to consider this move done. |
| System.Single | weight | The weight of this KaijuMovement. |
Fields
DefaultDistance
The default Distance of KaijuApproachingMovements and KaijuPathFollowMovements.
Declaration
public const float DefaultDistance = 0.1F
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. |