Class KaijuWanderMovement
Wander steering behaviour.
Inherited Members
Namespace: KaijuSolutions.Agents.Movement
Syntax
public class KaijuWanderMovement : KaijuMovement
Constructors
KaijuWanderMovement(KaijuAgent, Single, Single, Single)
Create a wonder movement.
Declaration
public KaijuWanderMovement(KaijuAgent agent, float distance = 20F, float radius = 1F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this is assigned to. |
| System.Single | distance | How far out to generate the wander circle. |
| System.Single | radius | The radius of the wander circle. |
| System.Single | weight | The weight of this KaijuMovement. |
Fields
DefaultDistance
The default Distance for wander movements.
Declaration
public const float DefaultDistance = 20F
Field Value
| Type | Description |
|---|---|
| System.Single |
DefaultRadius
The default Radius for wander movements.
Declaration
public const float DefaultRadius = 1F
Field Value
| Type | Description |
|---|---|
| System.Single |
Properties
Center
The center point of the circle.
Declaration
public Vector2 Center { get; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Center3
The center point of the circle.
Declaration
public Vector3 Center3 { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Distance
How far out to generate the wander circle.
Declaration
public float Distance { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Radius
The radius of the wander circle.
Declaration
public float Radius { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Target
The target calculated along the circle.
Declaration
public Vector2 Target { get; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Target3
The target calculated along the circle.
Declaration
public Vector3 Target3 { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Methods
EditorRenderVisualizations(Vector3)
Render the visualization of the KaijuMovement. The position of the Agent.
Declaration
protected override void EditorRenderVisualizations(Vector3 position)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position |
Overrides
EditorVisualizationColor()
Get the color for visualizations.
Declaration
protected override Color EditorVisualizationColor()
Returns
| Type | Description |
|---|---|
| Color | The color for visualizations |
Overrides
Get(KaijuAgent, Single, Single, Single)
Get a wander movement.
Declaration
public static KaijuWanderMovement Get(KaijuAgent agent, float distance = 20F, float radius = 1F, float weight = 1F)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | agent | The KaijuAgent this will be assigned to. |
| System.Single | distance | How far out to generate the wander circle. |
| System.Single | radius | The radius of the wander circle. |
| System.Single | weight | The weight of this KaijuMovement. |
Returns
| Type | Description |
|---|---|
| KaijuWanderMovement | Get a wander movement for the KaijuAgent. |
Move(Vector2, Single)
Get the KaijuMovement.
Declaration
public override Vector2 Move(Vector2 position, float delta)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The position of the Agent. |
| System.Single | delta | The time step. |
Returns
| Type | Description |
|---|---|
| Vector2 | The calculated move vector. |
Overrides
Reset()
Perform any needed reset operations.
Declaration
protected override void Reset()
Overrides
Setup()
Handle any additional setup.
Declaration
protected override void Setup()