Search Results for

    Show / Hide Table of Contents

    Class KaijuAttackActuator

    Base KaijuActuator for attacking other objects. This will perform a raycast in the direction of its forward.

    Inheritance
    System.Object
    KaijuBehaviour
    KaijuActuator
    KaijuAttackActuator
    KaijuEverythingAttackActuator
    Inherited Members
    KaijuActuator.OnStarted
    KaijuActuator.OnStartedGlobal
    KaijuActuator.OnExecuting
    KaijuActuator.OnExecutingGlobal
    KaijuActuator.OnDone
    KaijuActuator.OnDoneGlobal
    KaijuActuator.OnInterrupted
    KaijuActuator.OnInterruptedGlobal
    KaijuActuator.OnFailed
    KaijuActuator.OnFailedGlobal
    KaijuActuator.OnEnabled
    KaijuActuator.OnEnabledGlobal
    KaijuActuator.OnDisabled
    KaijuActuator.OnDisabledGlobal
    KaijuActuator.Agent
    KaijuActuator.IsRunning
    KaijuActuator.State
    KaijuActuator.Begin()
    KaijuActuator.End()
    KaijuActuator.Handle()
    KaijuActuator.EditorVisualize(Vector3)
    KaijuBehaviour.OnPreSetPosition
    KaijuBehaviour.OnPreSetPositionGlobal
    KaijuBehaviour.OnSetPosition
    KaijuBehaviour.OnSetPositionGlobal
    KaijuBehaviour.OnPreSetOrientation
    KaijuBehaviour.OnPreSetOrientationGlobal
    KaijuBehaviour.OnSetOrientation
    KaijuBehaviour.OnSetOrientationGlobal
    KaijuBehaviour.OnPreSetScale
    KaijuBehaviour.OnPreSetScaleGlobal
    KaijuBehaviour.OnSetScale
    KaijuBehaviour.OnSetScaleGlobal
    KaijuBehaviour.Position
    KaijuBehaviour.Position3
    KaijuBehaviour.LocalPosition
    KaijuBehaviour.LocalPosition3
    KaijuBehaviour.X
    KaijuBehaviour.LocalX
    KaijuBehaviour.Y
    KaijuBehaviour.LocalY
    KaijuBehaviour.Z
    KaijuBehaviour.LocalZ
    KaijuBehaviour.Orientation
    KaijuBehaviour.LocalOrientation
    KaijuBehaviour.OrientationAngles
    KaijuBehaviour.LocalOrientationAngles
    KaijuBehaviour.OrientationQuaternion
    KaijuBehaviour.LocalOrientationQuaternion
    KaijuBehaviour.OrientationX
    KaijuBehaviour.LocalOrientationX
    KaijuBehaviour.OrientationY
    KaijuBehaviour.LocalOrientationY
    KaijuBehaviour.OrientationZ
    KaijuBehaviour.LocalOrientationZ
    KaijuBehaviour.OrientationQuaternionX
    KaijuBehaviour.LocalOrientationQuaternionX
    KaijuBehaviour.OrientationQuaternionY
    KaijuBehaviour.LocalOrientationQuaternionY
    KaijuBehaviour.OrientationQuaternionZ
    KaijuBehaviour.LocalOrientationQuaternionZ
    KaijuBehaviour.OrientationQuaternionW
    KaijuBehaviour.LocalOrientationQuaternionW
    KaijuBehaviour.LocalScale
    KaijuBehaviour.LocalScaleX
    KaijuBehaviour.LocalScaleY
    KaijuBehaviour.LocalScaleZ
    KaijuBehaviour.GlobalScale
    KaijuBehaviour.GlobalScaleX
    KaijuBehaviour.GlobalScaleY
    KaijuBehaviour.GlobalScaleZ
    KaijuBehaviour.LocalToWorld
    KaijuBehaviour.WorldToLocal
    KaijuBehaviour.Forward
    KaijuBehaviour.Forward3
    KaijuBehaviour.Backwards
    KaijuBehaviour.Up
    KaijuBehaviour.Down
    KaijuBehaviour.Right
    KaijuBehaviour.Left
    KaijuBehaviour.Parent
    KaijuBehaviour.Root
    KaijuBehaviour.ChildCount
    KaijuBehaviour.HasChanged
    KaijuBehaviour.HierarchyCount
    KaijuBehaviour.HierarchyCapacity
    KaijuBehaviour.Layer
    KaijuBehaviour.ComponentCount
    KaijuBehaviour.ActiveInHierarchy
    KaijuBehaviour.ActiveSelf
    KaijuBehaviour.IsStatic
    KaijuBehaviour.Scene
    Namespace: KaijuSolutions.Agents.Actuators
    Syntax
    public abstract class KaijuAttackActuator : KaijuActuator

    Fields

    checkParents

    Often, a child collider may be hit. This will continue to perform the HandleHit(RaycastHit, Transform) method against all parent objects to handle this case.

    Declaration
    public bool checkParents
    Field Value
    Type Description
    System.Boolean

    lineRenderer

    The line renderer for visualizing the attacks.

    Declaration
    protected LineRenderer lineRenderer
    Field Value
    Type Description
    LineRenderer

    mask

    The layers to use for ray casting.

    Declaration
    public LayerMask mask
    Field Value
    Type Description
    LayerMask

    triggers

    How string-pulling should consider triggers.

    Declaration
    public QueryTriggerInteraction triggers
    Field Value
    Type Description
    QueryTriggerInteraction

    Properties

    Charge

    The time it takes to charge the attack in seconds before it is performed.

    Declaration
    public float Charge { get; set; }
    Property Value
    Type Description
    System.Single

    Cooldown

    The time it takes to cooldown after the attack in seconds before it can be performed again.

    Declaration
    public float Cooldown { get; set; }
    Property Value
    Type Description
    System.Single

    LastPoint

    The last point which was hit. Note if currently charging an attack, this will still be the previously hit target.

    Declaration
    public Vector3? LastPoint { get; }
    Property Value
    Type Description
    System.Nullable<Vector3>

    LastTarget

    The last object which was hit. Note if currently charging an attack, this will still be the previously hit target.

    Declaration
    public Transform LastTarget { get; }
    Property Value
    Type Description
    Transform

    OnCooldown

    If this attack actuator is currently cooling down.

    Declaration
    public bool OnCooldown { get; }
    Property Value
    Type Description
    System.Boolean

    Range

    The range of the attack.

    Declaration
    public float Range { get; set; }
    Property Value
    Type Description
    System.Single

    Visible

    How long the lineRenderer should be visible in seconds.

    Declaration
    public float Visible { get; set; }
    Property Value
    Type Description
    System.Single

    Methods

    Cleanup()

    Perform any needed resetting of the KaijuActuator.

    Declaration
    protected override void Cleanup()
    Overrides
    KaijuActuator.Cleanup()

    HandleHit(RaycastHit, Transform)

    Handle the hit logic.

    Declaration
    protected abstract bool HandleHit(RaycastHit hit, Transform t)
    Parameters
    Type Name Description
    RaycastHit hit

    The hit details.

    Transform t

    The transform currently being checked. This may not be the same as the one in the hit parameter in the case of checking parents.

    Returns
    Type Description
    System.Boolean

    If the attack was a success or not.

    PostActions(Boolean)

    Any final actions to perform after the actuator has performed.

    Declaration
    protected virtual void PostActions(bool success)
    Parameters
    Type Name Description
    System.Boolean success

    If it succeeded or not.

    PreConditions()

    Any conditions which must be passed to begin running the actuator. This does not need to account for the Charge or Cooldown.

    Declaration
    protected virtual bool PreConditions()
    Returns
    Type Description
    System.Boolean

    If the conditions to run this were passed.

    Run()

    Run the KaijuActuator.

    Declaration
    protected override KaijuActuatorState Run()
    Returns
    Type Description
    KaijuActuatorState

    The state of the KaijuActuator's progress.

    Overrides
    KaijuActuator.Run()

    Operators

    Implicit(GameObject to KaijuAttackActuator)

    Implicit conversion from a GameObject.

    Declaration
    public static implicit operator KaijuAttackActuator(GameObject o)
    Parameters
    Type Name Description
    GameObject o

    The GameObject.

    Returns
    Type Description
    KaijuAttackActuator

    The attack actuator attached to the GameObject if there was one.

    Implicit(KaijuAttackActuator to KaijuAgent)

    Implicit conversion to a KaijuAgent.

    Declaration
    public static implicit operator KaijuAgent(KaijuAttackActuator s)
    Parameters
    Type Name Description
    KaijuAttackActuator s

    The attack actuator.

    Returns
    Type Description
    KaijuAgent

    The KaijuAgent attached to the attack actuator if there was one.

    Implicit(Transform to KaijuAttackActuator)

    Implicit conversion from a transform.

    Declaration
    public static implicit operator KaijuAttackActuator(Transform t)
    Parameters
    Type Name Description
    Transform t

    The transform.

    Returns
    Type Description
    KaijuAttackActuator

    The attack actuator attached to the transform if there was one.

    In This Article
    Back to top MIT License © 2026 Kaiju Solutions Inc.