Search Results for

    Show / Hide Table of Contents

    Class EntityControl

    Inheritance
    object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    Mirror.NetworkBehaviour
    DewNetworkBehaviour
    EntityComponent
    EntityControl
    Implements
    ILogicUpdate
    ICleanup
    Inherited Members
    EntityComponent.entity
    EntityComponent.OnDisable()
    DewNetworkBehaviour.FxPlayNewNetworked(GameObject, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlayNewNetworked(GameObject, Entity)
    DewNetworkBehaviour.FxPlayNewNetworked(GameObject, Entity, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlayNewNetworked(GameObject)
    DewNetworkBehaviour.FxPlayNetworked(GameObject)
    DewNetworkBehaviour.FxPlayNetworked(GameObject, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlayNetworked(GameObject, Entity)
    DewNetworkBehaviour.FxPlayNetworked(GameObject, Entity, Vector3, Quaternion?)
    DewNetworkBehaviour.FxStopNetworked(GameObject)
    DewNetworkBehaviour.FxPlayNew(GameObject)
    DewNetworkBehaviour.FxPlayNew(GameObject, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlayNew(GameObject, Entity)
    DewNetworkBehaviour.FxPlayNew(GameObject, Entity, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlay(GameObject)
    DewNetworkBehaviour.FxPlay(GameObject, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlay(GameObject, Entity)
    DewNetworkBehaviour.FxPlay(GameObject, Entity, Vector3, Quaternion?)
    DewNetworkBehaviour.FxStop(GameObject)
    DewNetworkBehaviour.FxApplySpeedMultiplier(GameObject, float)
    DewNetworkBehaviour.FxApplySpeedMultiplierNetworked(GameObject, float)
    DewNetworkBehaviour.Awake()
    DewNetworkBehaviour.InvalidateInstance()
    DewNetworkBehaviour.OnStopClient()
    DewNetworkBehaviour.OnLateStart()
    DewNetworkBehaviour.OnLateStartServer()
    DewNetworkBehaviour.OnDestroy()
    DewNetworkBehaviour.GetComponent<T>(out T)
    Namespace: Global
    Assembly: Dew.Core.dll
    Syntax
    [HideMonoScript]
    [RequireComponent(typeof(EntityTransformSync))]
    public class EntityControl : EntityComponent, ILogicUpdate, ICleanup

    Fields

    attackTarget

    Available on server.

    Declaration
    [NonSerialized]
    public Entity attackTarget
    Field Value
    Type Description
    Entity

    baseAgentSpeed

    Declaration
    public float baseAgentSpeed
    Field Value
    Type Description
    float

    ClientEvent_OnDisplacementCanceled

    Declaration
    public SafeAction<Displacement> ClientEvent_OnDisplacementCanceled
    Field Value
    Type Description
    SafeAction<Displacement>

    ClientEvent_OnDisplacementFinished

    Declaration
    public SafeAction<Displacement> ClientEvent_OnDisplacementFinished
    Field Value
    Type Description
    SafeAction<Displacement>

    ClientEvent_OnDisplacementStarted

    Declaration
    public SafeAction<Displacement> ClientEvent_OnDisplacementStarted
    Field Value
    Type Description
    SafeAction<Displacement>

    ClientEvent_OnInnerRadiusChanged

    Declaration
    public SafeAction<float, float> ClientEvent_OnInnerRadiusChanged
    Field Value
    Type Description
    SafeAction<float, float>

    ClientEvent_OnOuterRadiusChanged

    Declaration
    public SafeAction<float, float> ClientEvent_OnOuterRadiusChanged
    Field Value
    Type Description
    SafeAction<float, float>

    ClientEvent_OnTeleport

    Declaration
    public SafeAction<Vector3, Vector3> ClientEvent_OnTeleport
    Field Value
    Type Description
    SafeAction<UnityEngine.Vector3, UnityEngine.Vector3>

    CommandStallTimeout

    Declaration
    public const float CommandStallTimeout = 0.15
    Field Value
    Type Description
    float

    lastMoveTime

    Available on server.

    Declaration
    [NonSerialized]
    public float lastMoveTime
    Field Value
    Type Description
    float

    normalizedAcceleration

    Declaration
    public float normalizedAcceleration
    Field Value
    Type Description
    float

    obstacleAvoidance

    Declaration
    public bool obstacleAvoidance
    Field Value
    Type Description
    bool

    ongoingChannels

    List of ongoingChannels on this entity.

    Only valid on server.

    Declaration
    public List<Channel> ongoingChannels
    Field Value
    Type Description
    System.Collections.Generic.List<T><Channel>

    QueuedActionExpireTime

    Declaration
    public const float QueuedActionExpireTime = 0.2
    Field Value
    Type Description
    float

    rotateSpeed

    Declaration
    public float rotateSpeed
    Field Value
    Type Description
    float

    rotationSmoothTime

    Declaration
    public float rotationSmoothTime
    Field Value
    Type Description
    float

    SyncAgentVelocityLifetime

    Declaration
    public static float SyncAgentVelocityLifetime
    Field Value
    Type Description
    float

    SyncExtrapolateMaxTime

    Declaration
    public static float SyncExtrapolateMaxTime
    Field Value
    Type Description
    float

    SyncExtrapolateStrength

    Declaration
    public static float SyncExtrapolateStrength
    Field Value
    Type Description
    float

    SyncFixSmoothTime

    Declaration
    public static float SyncFixSmoothTime
    Field Value
    Type Description
    float

    SyncFixSnapshotLifetime

    Declaration
    public static float SyncFixSnapshotLifetime
    Field Value
    Type Description
    float

    SyncFixWarpDistance

    Declaration
    public static float SyncFixWarpDistance
    Field Value
    Type Description
    float

    Properties

    agentPosition

    Declaration
    public Vector3 agentPosition { get; }
    Property Value
    Type Description
    UnityEngine.Vector3

    agentVelocity

    Agent velocity of this entity. Available everywhere.

    Declaration
    public Vector3 agentVelocity { get; }
    Property Value
    Type Description
    UnityEngine.Vector3

    canDestroy

    Declaration
    public bool canDestroy { get; }
    Property Value
    Type Description
    bool

    currentMaxAgentSpeed

    Declaration
    public float currentMaxAgentSpeed { get; }
    Property Value
    Type Description
    float

    desiredAngle

    Declaration
    public float desiredAngle { get; }
    Property Value
    Type Description
    float

    desiredRotation

    Declaration
    public Quaternion desiredRotation { get; }
    Property Value
    Type Description
    UnityEngine.Quaternion

    forceWalking

    Declaration
    public bool forceWalking { get; }
    Property Value
    Type Description
    bool

    freeMovement

    Disables agent.

    Declaration
    public bool freeMovement { get; set; }
    Property Value
    Type Description
    bool

    innerRadius

    Declaration
    public float innerRadius { get; set; }
    Property Value
    Type Description
    float

    isAirborne

    Is this entity doing non-friendly displacement?

    Declaration
    public bool isAirborne { get; }
    Property Value
    Type Description
    bool

    isClientSideMovement

    Is client-side movement enabled for this entity?

    Declaration
    public bool isClientSideMovement { get; }
    Property Value
    Type Description
    bool

    isControlReversed

    This only has effect on player-controlled entities.

    Declaration
    public bool isControlReversed { get; set; }
    Property Value
    Type Description
    bool

    isDashing

    Is this entity doing friendly displacement?

    Declaration
    public bool isDashing { get; }
    Property Value
    Type Description
    bool

    isDisplacing

    Declaration
    public bool isDisplacing { get; }
    Property Value
    Type Description
    bool

    isDodging

    Is this entity doing a displacement from dodge ability? e.g. Ai_GenericDodge

    Declaration
    public bool isDodging { get; }
    Property Value
    Type Description
    bool

    isDoingMoveToAction

    Available on movement processors and server

    Declaration
    public bool isDoingMoveToAction { get; }
    Property Value
    Type Description
    bool

    isGamepadRotationLocked

    Is gamepad look rotation locked?

    Declaration
    public bool isGamepadRotationLocked { get; }
    Property Value
    Type Description
    bool

    isLocalMovementProcessor

    Is local machine liable for processing movements?

    Declaration
    public bool isLocalMovementProcessor { get; }
    Property Value
    Type Description
    bool

    isWalking

    Is this entity walking? Available everywhere.

    Declaration
    public bool isWalking { get; }
    Property Value
    Type Description
    bool

    ongoingDisplacement

    Declaration
    public Displacement ongoingDisplacement { get; }
    Property Value
    Type Description
    Displacement

    outerRadius

    Declaration
    public float outerRadius { get; set; }
    Property Value
    Type Description
    float

    overridenDesiredAngle

    Declaration
    public float? overridenDesiredAngle { get; }
    Property Value
    Type Description
    float?

    proxyCollider

    Declaration
    public ProxyCollider proxyCollider { get; }
    Property Value
    Type Description
    ProxyCollider

    queuedActions

    Declaration
    public IReadOnlyList<ActionBase> queuedActions { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<T><ActionBase>

    walkStrength

    Can have values of range 0 ~ 1 depending on how fast it is walking. Available everywhere.

    Declaration
    public float walkStrength { get; }
    Property Value
    Type Description
    float

    Methods

    Attack(Entity, bool)

    Declaration
    public void Attack(Entity target, bool doChase)
    Parameters
    Type Name Description
    Entity target
    bool doChase

    AttackMove(Vector3, bool)

    Declaration
    public void AttackMove(Vector3 destination, bool useDistanceFromDestination = false)
    Parameters
    Type Name Description
    UnityEngine.Vector3 destination
    bool useDistanceFromDestination

    CancelOngoingChannels()

    Declaration
    public void CancelOngoingChannels()

    CancelOngoingDisplacement()

    Declaration
    public void CancelOngoingDisplacement()

    Cast(AbilityTrigger, CastInfo, bool)

    Declaration
    public void Cast(AbilityTrigger trigger, CastInfo info, bool allowMoveToCast = true)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    CastInfo info
    bool allowMoveToCast

    Cast(AbilityTrigger, Entity, bool)

    Declaration
    public void Cast(AbilityTrigger trigger, Entity predictTarget, bool allowMoveToCast = true)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    Entity predictTarget
    bool allowMoveToCast

    Cast(AbilityTrigger, int, CastInfo, bool, bool)

    Provide -1 for configIndex to denote ANY config index.
    This will cause undefined behavior if cast method differs between configs!!

    Declaration
    public void Cast(AbilityTrigger trigger, int configIndex, CastInfo info, bool allowMoveToCast = true, bool skipRangeCheck = false)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    int configIndex
    CastInfo info
    bool allowMoveToCast
    bool skipRangeCheck

    Cast(AbilityTrigger, int, Entity, bool)

    Declaration
    public void Cast(AbilityTrigger trigger, int configIndex, Entity predictTarget, bool allowMoveToCast = true)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    int configIndex
    Entity predictTarget
    bool allowMoveToCast

    ClearActionQueue()

    Declaration
    public void ClearActionQueue()

    ClearMovement()

    Declaration
    public void ClearMovement()

    CmdAttack(Entity, bool)

    Provide null to clear attack target.

    Declaration
    public void CmdAttack(Entity target, bool doChase)
    Parameters
    Type Name Description
    Entity target
    bool doChase

    CmdAttackMove(Vector3, bool)

    Declaration
    public void CmdAttackMove(Vector3 destination, bool useDistanceFromDestination)
    Parameters
    Type Name Description
    UnityEngine.Vector3 destination
    bool useDistanceFromDestination

    CmdCancelOngoingChannels()

    Declaration
    public void CmdCancelOngoingChannels()

    CmdCast(AbilityTrigger, int, CastInfo, bool, bool)

    Declaration
    public void CmdCast(AbilityTrigger trigger, int configIndex, CastInfo info, bool allowMoveToCast, bool skipRangeCheck)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    int configIndex
    CastInfo info
    bool allowMoveToCast
    bool skipRangeCheck

    CmdClearMovement()

    Declaration
    public void CmdClearMovement()

    CmdInteract(IInteractable, bool, bool)

    Declaration
    public void CmdInteract(IInteractable interactable, bool isAlt, bool isMouse)
    Parameters
    Type Name Description
    IInteractable interactable
    bool isAlt
    bool isMouse

    CmdLookInDirection(Vector3)

    Declaration
    public void CmdLookInDirection(Vector3 dir)
    Parameters
    Type Name Description
    UnityEngine.Vector3 dir

    CmdMoveToDestination(Vector3, bool, float)

    Declaration
    public void CmdMoveToDestination(Vector3 destination, bool immediately, float speedMult = 1)
    Parameters
    Type Name Description
    UnityEngine.Vector3 destination
    bool immediately
    float speedMult

    CmdMoveWithDirection(Vector3)

    Declaration
    public void CmdMoveWithDirection(Vector3 direction)
    Parameters
    Type Name Description
    UnityEngine.Vector3 direction

    CmdStop()

    Declaration
    public void CmdStop()

    CreateTransformABTo01(Vector2, Vector2)

    Declaration
    public static Matrix4x4 CreateTransformABTo01(Vector2 a, Vector2 b)
    Parameters
    Type Name Description
    UnityEngine.Vector2 a
    UnityEngine.Vector2 b
    Returns
    Type Description
    UnityEngine.Matrix4x4

    DecrementBlockCounters(BlockedAction, bool)

    Declaration
    public void DecrementBlockCounters(Channel.BlockedAction action, bool delayOneFrame = true)
    Parameters
    Type Name Description
    Channel.BlockedAction action
    bool delayOneFrame

    DisobeyBlock(BlockableAction)

    Disobey blocks for certain action, canceling related channels.

    Declaration
    public void DisobeyBlock(EntityControl.BlockableAction action)
    Parameters
    Type Name Description
    EntityControl.BlockableAction action

    FrameUpdate()

    Declaration
    public override void FrameUpdate()
    Overrides
    DewNetworkBehaviour.FrameUpdate()

    GetPointOnBezierCurve(Vector2, Vector2, Vector2, Vector2, float)

    Declaration
    public static Vector2 GetPointOnBezierCurve(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t)
    Parameters
    Type Name Description
    UnityEngine.Vector2 p0
    UnityEngine.Vector2 p1
    UnityEngine.Vector2 p2
    UnityEngine.Vector2 p3
    float t
    Returns
    Type Description
    UnityEngine.Vector2

    IncrementBlockCounters(BlockedAction)

    Declaration
    public void IncrementBlockCounters(Channel.BlockedAction action)
    Parameters
    Type Name Description
    Channel.BlockedAction action

    Interact(IInteractable, bool, bool)

    Declaration
    public void Interact(IInteractable interactable, bool isAlt, bool isMouse)
    Parameters
    Type Name Description
    IInteractable interactable
    bool isAlt
    bool isMouse

    IsActionBlocked(BlockableAction)

    Is the entity allowed to do a certain action? If not, the action will be postponed until the block is resolved.
    Available everywhere.

    Declaration
    public EntityControl.BlockStatus IsActionBlocked(EntityControl.BlockableAction action)
    Parameters
    Type Name Description
    EntityControl.BlockableAction action
    Returns
    Type Description
    EntityControl.BlockStatus

    LockGamepadRotation()

    Lock gamepad look rotation of this entity. You must call UnlockLookRotation afterwards.

    Declaration
    public void LockGamepadRotation()

    LogicUpdate(float)

    Declaration
    public override void LogicUpdate(float dt)
    Parameters
    Type Name Description
    float dt
    Overrides
    DewNetworkBehaviour.LogicUpdate(float)

    MoveToDestination(Vector3, bool, float)

    Declaration
    public void MoveToDestination(Vector3 destination, bool immediately, float speedMult = 1)
    Parameters
    Type Name Description
    UnityEngine.Vector3 destination
    bool immediately
    float speedMult

    OnCleanup()

    Declaration
    public void OnCleanup()

    OnStart()

    Declaration
    public override void OnStart()
    Overrides
    DewNetworkBehaviour.OnStart()

    OnStartClient()

    Declaration
    public override void OnStartClient()
    Overrides
    DewNetworkBehaviour.OnStartClient()

    OnStartServer()

    Declaration
    public override void OnStartServer()
    Overrides
    DewNetworkBehaviour.OnStartServer()

    OnStop()

    Declaration
    public override void OnStop()
    Overrides
    DewNetworkBehaviour.OnStop()

    OnStopServer()

    Declaration
    public override void OnStopServer()
    Overrides
    DewNetworkBehaviour.OnStopServer()

    Rotate(float, bool, float)

    Declaration
    public void Rotate(float angle, bool immediately, float overrideDuration = -1)
    Parameters
    Type Name Description
    float angle
    bool immediately
    float overrideDuration

    Rotate(Quaternion, bool, float)

    Declaration
    public void Rotate(Quaternion rotation, bool immediately, float overrideDuration = -1)
    Parameters
    Type Name Description
    UnityEngine.Quaternion rotation
    bool immediately
    float overrideDuration

    Rotate(Vector3, bool, float)

    Declaration
    public void Rotate(Vector3 forward, bool immediately, float overrideDuration = -1)
    Parameters
    Type Name Description
    UnityEngine.Vector3 forward
    bool immediately
    float overrideDuration

    RotateTowards(Entity, bool, float)

    Declaration
    public void RotateTowards(Entity ent, bool immediately, float overrideDuration = -1)
    Parameters
    Type Name Description
    Entity ent
    bool immediately
    float overrideDuration

    RotateTowards(Vector3, bool, float)

    Declaration
    public void RotateTowards(Vector3 position, bool immediately, float overrideDuration = -1)
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    bool immediately
    float overrideDuration

    SetAgentDestination(Vector3, bool)

    Declaration
    public void SetAgentDestination(Vector3 destination, bool important)
    Parameters
    Type Name Description
    UnityEngine.Vector3 destination
    bool important

    SetAgentPosition(Vector3)

    Can be called on local movement processor.

    Declaration
    public void SetAgentPosition(Vector3 position)
    Parameters
    Type Name Description
    UnityEngine.Vector3 position

    StartChannel(Channel)

    Declaration
    public Channel StartChannel(Channel channel)
    Parameters
    Type Name Description
    Channel channel
    Returns
    Type Description
    Channel

    StartDaze(float)

    Declaration
    public Channel StartDaze(float duration)
    Parameters
    Type Name Description
    float duration
    Returns
    Type Description
    Channel

    StartDisplacement(Displacement)

    Declaration
    public void StartDisplacement(Displacement disp)
    Parameters
    Type Name Description
    Displacement disp

    Stop()

    Declaration
    public void Stop()

    StopOverrideRotation()

    Unlock override rotation.

    Declaration
    public void StopOverrideRotation()

    Teleport(Vector3)

    Teleport this entity to the targeted position.

    You should only feed in a valid position by using Dew.GetValidAgentPosition() beforehand.

    Declaration
    public void Teleport(Vector3 position)
    Parameters
    Type Name Description
    UnityEngine.Vector3 position

    TransformPoint(Vector2, Matrix4x4)

    Declaration
    public static Vector2 TransformPoint(Vector2 point, Matrix4x4 transform)
    Parameters
    Type Name Description
    UnityEngine.Vector2 point
    UnityEngine.Matrix4x4 transform
    Returns
    Type Description
    UnityEngine.Vector2

    UnlockGamepadRotation()

    Unlock gamepad look rotation of this entity.

    Declaration
    public void UnlockGamepadRotation()

    UpdateLastMoveTime()

    Declaration
    public void UpdateLastMoveTime()

    Implements

    ILogicUpdate
    ICleanup

    Extension Methods

    DewGUI.SetExpandHeight<T>(T, bool)
    DewGUI.SetExpandHeight<T>(T, float)
    DewGUI.SetExpandWidth<T>(T, bool)
    DewGUI.SetExpandWidth<T>(T, float)
    DewGUI.SetHeight<T>(T, float)
    DewGUI.SetText<T>(T, string)
    DewGUI.SetTextLocalized<T>(T, string)
    DewGUI.SetWidth<T>(T, float)
    In This Article
    Back to top Shape of Dreams API Documentation