Class KaijuController
Base class to inherit for easy interaction with a KaijuAgent. Simply override the methods you need to use callbacks without needing to worry about binding. If you override either OnEnable or OnDisable, you must call their respective base methods for binding and cleanup.
Inheritance
Inherited Members
Namespace: KaijuSolutions.Agents
Syntax
public abstract class KaijuController : KaijuBehaviour
Properties
Agent
The KaijuAgent this is listening to.
Declaration
public KaijuAgent Agent { get; }
Property Value
| Type | Description |
|---|---|
| KaijuAgent |
Methods
OnActuatorDisabled(KaijuActuator)
Callback for when an KaijuActuator has been disabled.
Declaration
protected virtual void OnActuatorDisabled(KaijuActuator actuator)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuActuator | actuator | The KaijuActuator. |
OnActuatorDone(KaijuActuator)
Callback for when an KaijuActuator has successfully fully completed its action.
Declaration
protected virtual void OnActuatorDone(KaijuActuator actuator)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuActuator | actuator | The KaijuActuator. |
OnActuatorEnabled(KaijuActuator)
Callback for when an KaijuActuator has been enabled.
Declaration
protected virtual void OnActuatorEnabled(KaijuActuator actuator)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuActuator | actuator | The KaijuActuator. |
OnActuatorExecuting(KaijuActuator)
Callback for when an KaijuActuator is continuing to execute.
Declaration
protected virtual void OnActuatorExecuting(KaijuActuator actuator)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuActuator | actuator | The KaijuActuator. |
OnActuatorFailed(KaijuActuator)
Callback for when an KaijuActuator has failed its execution.
Declaration
protected virtual void OnActuatorFailed(KaijuActuator actuator)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuActuator | actuator | The KaijuActuator. |
OnActuatorInterrupted(KaijuActuator)
Callback for when an KaijuActuator has been interrupted during its execution, cancelling the execution.
Declaration
protected virtual void OnActuatorInterrupted(KaijuActuator actuator)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuActuator | actuator | The KaijuActuator. |
OnActuatorStarted(KaijuActuator)
Callback for when an KaijuActuator has started to execute.
Declaration
protected virtual void OnActuatorStarted(KaijuActuator actuator)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuActuator | actuator | The KaijuActuator. |
OnAgentPreSetOrientation()
Callback for before the Agent's orientation has been set.
Declaration
protected virtual void OnAgentPreSetOrientation()
OnAgentPreSetPosition()
Callback for before the Agent's position has been set.
Declaration
protected virtual void OnAgentPreSetPosition()
OnAgentPreSetScale()
Callback for before the Agent's scale has been set.
Declaration
protected virtual void OnAgentPreSetScale()
OnAgentSetOrientation()
Callback for when the Agent's orientation has been set.
Declaration
protected virtual void OnAgentSetOrientation()
OnAgentSetPosition()
Callback for when the Agent's position has been set.
Declaration
protected virtual void OnAgentSetPosition()
OnAgentSetScale()
Callback for when the Agent's scale has been set.
Declaration
protected virtual void OnAgentSetScale()
OnAutomaticSense()
Callback for when all automatic KaijuSensors have finished being executed.
Declaration
protected virtual void OnAutomaticSense()
OnAutoRotate()
Autorotation changed callback for the Agent.
Declaration
protected virtual void OnAutoRotate()
OnDestroyed()
Callback for when the Agent has finishing becoming destroyed.
Declaration
protected virtual void OnDestroyed()
OnDisabled()
Callback for when the Agent has finishing becoming disabled.
Declaration
protected virtual void OnDisabled()
OnEnabled()
Callback for when the Agent has finishing becoming enabled.
Declaration
protected virtual void OnEnabled()
OnLookSpeed()
Look speed changed callback for the Agent.
Declaration
protected virtual void OnLookSpeed()
OnLookTarget()
Callback for when the look target has been set for the Agent.
Declaration
protected virtual void OnLookTarget()
OnMove()
Callback for when the Agent has moved.
Declaration
protected virtual void OnMove()
OnMoveAcceleration()
Movement acceleration changed callback for the Agent.
Declaration
protected virtual void OnMoveAcceleration()
OnMovementPerformed(KaijuMovement)
Callback for when a KaijuMovement has been performed.
Declaration
protected virtual void OnMovementPerformed(KaijuMovement movement)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuMovement | movement | The KaijuMovement. |
OnMovementStarted(KaijuMovement)
Callback for when a KaijuMovement has started.
Declaration
protected virtual void OnMovementStarted(KaijuMovement movement)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuMovement | movement | The KaijuMovement. |
OnMovementStopped(KaijuMovement)
Callback for when a KaijuMovement has stopped.
Declaration
protected virtual void OnMovementStopped(KaijuMovement movement)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuMovement | movement | The KaijuMovement. |
OnMoveSpeed()
Movement speed changed callback for the Agent.
Declaration
protected virtual void OnMoveSpeed()
OnSense(KaijuSensor)
Callback for when a KaijuSensor has been run.
Declaration
protected virtual void OnSense(KaijuSensor sensor)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuSensor | sensor | The KaijuSensor. |
OnSensorDisabled(KaijuSensor)
Callback for when a KaijuSensor has been disabled.
Declaration
protected virtual void OnSensorDisabled(KaijuSensor sensor)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuSensor | sensor | The KaijuSensor. |
OnSensorEnabled(KaijuSensor)
Callback for when a KaijuSensor has been enabled.
Declaration
protected virtual void OnSensorEnabled(KaijuSensor sensor)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuSensor | sensor | The KaijuSensor. |
Operators
Implicit(GameObject to KaijuController)
Implicit conversion from a GameObject.
Declaration
public static implicit operator KaijuController(GameObject o)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | o | The GameObject. |
Returns
| Type | Description |
|---|---|
| KaijuController | The controller attached to the GameObject if there was one. |
Implicit(KaijuAgent to KaijuController)
Implicit conversion from a KaijuAgent.
Declaration
public static implicit operator KaijuController(KaijuAgent a)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuAgent | a | The KaijuAgent. |
Returns
| Type | Description |
|---|---|
| KaijuController | The controller attached to the KaijuAgent if there was one. |
Implicit(KaijuController to KaijuAgent)
Implicit conversion to a KaijuAgent.
Declaration
public static implicit operator KaijuAgent(KaijuController c)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuController | c | The KaijuController. |
Returns
| Type | Description |
|---|---|
| KaijuAgent | The KaijuAgent attached to The KaijuController if there was one. |
Implicit(Transform to KaijuController)
Implicit conversion from a transform.
Declaration
public static implicit operator KaijuController(Transform t)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | t | The transform. |
Returns
| Type | Description |
|---|---|
| KaijuController | The controller attached to the transform if there was one. |