Search Results for

    Show / Hide Table of Contents

    Class Actor

    Actor take actions in the game. Most of game-related things inherits actor.

    Inheritance
    object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    Mirror.NetworkBehaviour
    DewNetworkBehaviour
    Actor
    AbilityInstance
    AbilityTrigger
    Artifact
    Entity
    GameEffect
    Gem
    Rift
    Room_Trap_Toggleable
    RoomModifierBase
    ServerActor
    Shrine
    Treasure
    Implements
    ILogicUpdate
    ICleanup
    ICustomDestroyRoutine
    Inherited Members
    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.InvalidateInstance()
    DewNetworkBehaviour.OnLateStart()
    DewNetworkBehaviour.OnLateStartServer()
    DewNetworkBehaviour.OnStop()
    DewNetworkBehaviour.OnDestroy()
    DewNetworkBehaviour.GetComponent<T>(out T)
    Namespace: Global
    Assembly: Dew.Core.dll
    Syntax
    [SelectionBase]
    [DewResourceLink(ResourceLinkBy.Type)]
    public class Actor : DewNetworkBehaviour, ILogicUpdate, ICleanup, ICustomDestroyRoutine

    Fields

    ActorEvent_OnAbilityInstanceBeforePrepare

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoAbilityInstance> ActorEvent_OnAbilityInstanceBeforePrepare
    Field Value
    Type Description
    SafeAction<EventInfoAbilityInstance>

    ActorEvent_OnAbilityInstanceCreated

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoAbilityInstance> ActorEvent_OnAbilityInstanceCreated
    Field Value
    Type Description
    SafeAction<EventInfoAbilityInstance>

    ActorEvent_OnApplyElemental

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoApplyElemental> ActorEvent_OnApplyElemental
    Field Value
    Type Description
    SafeAction<EventInfoApplyElemental>

    ActorEvent_OnAttackEffectTriggered

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoAttackEffect> ActorEvent_OnAttackEffectTriggered
    Field Value
    Type Description
    SafeAction<EventInfoAttackEffect>

    ActorEvent_OnAttackHit

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoAttackHit> ActorEvent_OnAttackHit
    Field Value
    Type Description
    SafeAction<EventInfoAttackHit>

    ActorEvent_OnDealDamage

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoDamage> ActorEvent_OnDealDamage
    Field Value
    Type Description
    SafeAction<EventInfoDamage>

    ActorEvent_OnDoHeal

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoHeal> ActorEvent_OnDoHeal
    Field Value
    Type Description
    SafeAction<EventInfoHeal>

    ActorEvent_OnDoManaHeal

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoHeal> ActorEvent_OnDoManaHeal
    Field Value
    Type Description
    SafeAction<EventInfoHeal>

    ActorEvent_OnGiveShield

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoShield> ActorEvent_OnGiveShield
    Field Value
    Type Description
    SafeAction<EventInfoShield>

    ActorEvent_OnKill

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoKill> ActorEvent_OnKill
    Field Value
    Type Description
    SafeAction<EventInfoKill>

    ActorEvent_OnSpawnSummon

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoSummon> ActorEvent_OnSpawnSummon
    Field Value
    Type Description
    SafeAction<EventInfoSummon>

    ActorEvent_OnSpendMana

    Note that ActorEvents can also be from its descendants.

    Declaration
    public SafeAction<EventInfoSpentMana> ActorEvent_OnSpendMana
    Field Value
    Type Description
    SafeAction<EventInfoSpentMana>

    children

    Alive, non-destroyed children actors.

    Declaration
    public readonly List<Actor> children
    Field Value
    Type Description
    System.Collections.Generic.List<T><Actor>

    childrenInNetwork

    Children that are alive, or not yet despawned from the network.

    Declaration
    public readonly List<Actor> childrenInNetwork
    Field Value
    Type Description
    System.Collections.Generic.List<T><Actor>

    ClientActorEvent_OnCreate

    Called everywhere when an actor is created including child actors.

    Declaration
    public SafeAction<Actor> ClientActorEvent_OnCreate
    Field Value
    Type Description
    SafeAction<Actor>

    ClientActorEvent_OnDestroyed

    Called everywhere when this actor is destroyed.

    Declaration
    public SafeAction<Actor> ClientActorEvent_OnDestroyed
    Field Value
    Type Description
    SafeAction<Actor>

    ClientEvent_OnPersistentSyncedDataChanged

    Declaration
    public SafeAction<string> ClientEvent_OnPersistentSyncedDataChanged
    Field Value
    Type Description
    SafeAction<string>

    dealtCooldownReductionByRatioProcessor

    Processor for dealt cooldown reductions by ratio. This is only valid on server.
    All cooldown reductions done by this actor will be processed by this and every ancestor's preprocessors.

    Declaration
    public DataProcessorGroup<CooldownReductionByRatioSettings, Actor, AbilityTrigger> dealtCooldownReductionByRatioProcessor
    Field Value
    Type Description
    DataProcessorGroup<CooldownReductionByRatioSettings, Actor, AbilityTrigger>

    dealtCooldownReductionProcessor

    Processor for dealt cooldown reductions of fixed amount. This is only valid on server.
    All cooldown reductions done by this actor will be processed by this and every ancestor's preprocessors.

    Declaration
    public DataProcessorGroup<CooldownReductionSettings, Actor, AbilityTrigger> dealtCooldownReductionProcessor
    Field Value
    Type Description
    DataProcessorGroup<CooldownReductionSettings, Actor, AbilityTrigger>

    dealtDamageProcessor

    Processor for all dealt damages (Except pure damage). This is only valid on server.

    All damages from this actor will be processed by this and every ancestors' preprocessors.

    Declaration
    public DataProcessorGroup<DamageData, Actor, Entity> dealtDamageProcessor
    Field Value
    Type Description
    DataProcessorGroup<DamageData, Actor, Entity>

    dealtHealProcessor

    Processor for dealt heals. This is only valid on server.

    All heals from this actor will be processed by this and every ancestors' preprocessors.

    Declaration
    public DataProcessorGroup<HealData, Actor, Entity> dealtHealProcessor
    Field Value
    Type Description
    DataProcessorGroup<HealData, Actor, Entity>

    dealtManaHealProcessor

    Processor for dealt mana heals. This is only valid on server.

    All mana heals from this actor will be processed by this and every ancestors' preprocessors.

    Declaration
    public DataProcessorGroup<HealData, Actor, Entity> dealtManaHealProcessor
    Field Value
    Type Description
    DataProcessorGroup<HealData, Actor, Entity>

    dealtShieldProcessor

    Processor for received shields. This is only valid on server.

    Declaration
    public DataProcessorGroup<HealData, Actor, Entity> dealtShieldProcessor
    Field Value
    Type Description
    DataProcessorGroup<HealData, Actor, Entity>

    KilledByUnstoppableEffects

    Declaration
    public static Type[] KilledByUnstoppableEffects
    Field Value
    Type Description
    System.Type[]

    persistentData

    Available on server. Generic persistent data storage that will be saved and loaded with this actor.

    Declaration
    [SaveVar(SaveVarFlags.Default)]
    public readonly Dictionary<string, string> persistentData
    Field Value
    Type Description
    System.Collections.Generic.Dictionary<TKey, TValue><string, string>

    persistentSyncedData

    Available everywhere, and can only be set on server. Generic persistent synced data storage that will be saved and loaded with this actor, and be synced across the network.
    Use this to store states in the network context. (think: synced variables)

    Declaration
    [SaveVar(SaveVarFlags.Default)]
    public readonly SyncDictionary<string, string> persistentSyncedData
    Field Value
    Type Description
    Mirror.SyncDictionary<TKey, TValue><string, string>

    ScaleDurationByTenacityEffects

    Declaration
    public static Type[] ScaleDurationByTenacityEffects
    Field Value
    Type Description
    System.Type[]

    spawnedChildVarDefProcessor

    Declaration
    public DataProcessorGroup<VariantDef, Actor, Type> spawnedChildVarDefProcessor
    Field Value
    Type Description
    DataProcessorGroup<VariantDef, Actor, System.Type>

    Properties

    ancestors

    Enumerable ancestors of this actor. Ordering is the same as the actor tree order, first element being the direct parent.

    Declaration
    public IEnumerable<Actor> ancestors { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<T><Actor>

    chainTempName

    Reaction chain of this actor. Available only on server.

    Declaration
    public ReactionChain chainTempName { get; }
    Property Value
    Type Description
    ReactionChain

    creationTime

    Time of this actor's creation by Time.time.

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

    firstEntity

    The first entity in this actor's ancestor tree.

    This property can be used to e.g. find the caster of an ability instance.

    Declaration
    public Entity firstEntity { get; }
    Property Value
    Type Description
    Entity

    firstTrigger

    The first ability trigger in this actor's ancestor tree.

    This property can be used to e.g. find the ability instance's trigger.

    Declaration
    public AbilityTrigger firstTrigger { get; }
    Property Value
    Type Description
    AbilityTrigger

    isActive

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

    isDestroyed

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

    isDestroyedOnRoomChange

    Declaration
    public virtual bool isDestroyedOnRoomChange { get; }
    Property Value
    Type Description
    bool

    isDestroyLocked

    Is someone preventing this actor from being destroyed? Available only on server.

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

    isNewInstance

    Is it this actor created in this session of the game, or has been loaded from save?
    e.g. This will be false if this actor is part of a loaded game, or from previously visited node.

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

    parentActor

    Declaration
    public Actor parentActor { get; set; }
    Property Value
    Type Description
    Actor

    parentActorNetId

    Declaration
    public uint parentActorNetId { get; }
    Property Value
    Type Description
    uint

    persistentNetId

    Mirror sets netId to 0 on despawn. This property will tell you its former netId even after being despawned.

    Declaration
    public uint persistentNetId { get; }
    Property Value
    Type Description
    uint

    position

    Position of this actor. Same as transform.position.

    Declaration
    [SaveVar(SaveVarFlags.Default)]
    public Vector3 position { get; set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    rotation

    Rotation of this actor. Same as transform.rotation.

    Declaration
    [SaveVar(SaveVarFlags.Default)]
    public Quaternion rotation { get; set; }
    Property Value
    Type Description
    UnityEngine.Quaternion

    Methods

    ActiveFrameUpdate()

    Called everywhere every frame while this actor is active.

    Declaration
    protected virtual void ActiveFrameUpdate()

    ActiveLogicUpdate(float)

    Called everywhere every logic tick while this actor is active.

    Declaration
    protected virtual void ActiveLogicUpdate(float dt)
    Parameters
    Type Name Description
    float dt

    AddData<T>(T)

    Declaration
    public void AddData<T>(T data)
    Parameters
    Type Name Description
    T data
    Type Parameters
    Name Description
    T

    ApplyCooldownReduction(AbilityTrigger, CooldownReductionSettings)

    Apply cooldown reduction to all configs that can receive cooldown reduction.

    Declaration
    public void ApplyCooldownReduction(AbilityTrigger trigger, CooldownReductionSettings settings)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    CooldownReductionSettings settings

    ApplyCooldownReduction(AbilityTrigger, float, bool, bool)

    Apply cooldown reduction to all configs that can receive cooldown reduction.

    Declaration
    public void ApplyCooldownReduction(AbilityTrigger trigger, float amount, bool scaled = true, bool ignoreCanReceiveCooldown = false)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    float amount
    bool scaled
    bool ignoreCanReceiveCooldown

    ApplyCooldownReductionByRatio(AbilityTrigger, CooldownReductionByRatioSettings)

    Apply cooldown reduction to all configs that can receive cooldown reduction by ratio of max cooldown.

    Declaration
    public void ApplyCooldownReductionByRatio(AbilityTrigger trigger, CooldownReductionByRatioSettings settings)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    CooldownReductionByRatioSettings settings

    ApplyCooldownReductionByRatio(AbilityTrigger, float, bool)

    Apply cooldown reduction to all configs that can receive cooldown reduction by ratio of max cooldown.

    Declaration
    public void ApplyCooldownReductionByRatio(AbilityTrigger trigger, float ratio, bool ignoreCanReceiveCooldown = false)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    float ratio
    bool ignoreCanReceiveCooldown

    ApplyElemental(ElementalType, Entity, int)

    Declaration
    public ElementalStatusEffect ApplyElemental(ElementalType type, Entity to, int appliedStacks = 1)
    Parameters
    Type Name Description
    ElementalType type
    Entity to
    int appliedStacks
    Returns
    Type Description
    ElementalStatusEffect

    Awake()

    Declaration
    protected override void Awake()
    Overrides
    DewNetworkBehaviour.Awake()

    ClearExcludeFromRoomSave()

    Clear flag that excludes this actor from room save.
    Note this won't make non-saving by default actors to be saved.

    Declaration
    public void ClearExcludeFromRoomSave()

    CreateAbilityInstance(Type, Vector3, Quaternion?, CastInfo, Action<AbilityInstance>)

    Declaration
    public AbilityInstance CreateAbilityInstance(Type type, Vector3 position, Quaternion? rotation, CastInfo info, Action<AbilityInstance> beforePrepare = null)
    Parameters
    Type Name Description
    System.Type type
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    CastInfo info
    System.Action<T><AbilityInstance> beforePrepare
    Returns
    Type Description
    AbilityInstance

    CreateAbilityInstance<T>(T, Vector3, Quaternion?, CastInfo, Action<T>)

    Declaration
    public T CreateAbilityInstance<T>(T prefab, Vector3 position, Quaternion? rotation, CastInfo info, Action<T> beforePrepare = null) where T : AbilityInstance
    Parameters
    Type Name Description
    T prefab
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    CastInfo info
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateAbilityInstance<T>(Vector3, Quaternion?, CastInfo, Action<T>)

    Declaration
    public T CreateAbilityInstance<T>(Vector3 position, Quaternion? rotation, CastInfo info, Action<T> beforePrepare = null) where T : AbilityInstance
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    CastInfo info
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateActor<T>(T, Vector3, Quaternion?, Action<T>)

    Declaration
    public T CreateActor<T>(T prefab, Vector3 pos, Quaternion? rot, Action<T> beforePrepare = null) where T : Actor
    Parameters
    Type Name Description
    T prefab
    UnityEngine.Vector3 pos
    UnityEngine.Quaternion? rot
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateActor<T>(Vector3, Quaternion?, Action<T>)

    Declaration
    public T CreateActor<T>(Vector3 pos, Quaternion? rot, Action<T> beforePrepare = null) where T : Actor
    Parameters
    Type Name Description
    UnityEngine.Vector3 pos
    UnityEngine.Quaternion? rot
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateBasicEffect(Entity, BasicEffect, float, string, DuplicateEffectBehavior)

    Create a generic container status effect for applying basic effect to an entity.

    Give an id of null to prevent this behavior.

    The created status effect will be cleansable and killed by unstoppable if it contains a harmful effect.

    Declaration
    public Se_GenericEffectContainer CreateBasicEffect(Entity victim, BasicEffect eff, float duration, string id = null, DuplicateEffectBehavior onDuplicate = DuplicateEffectBehavior.ReplacePrevious)
    Parameters
    Type Name Description
    Entity victim
    BasicEffect eff
    float duration
    string id
    DuplicateEffectBehavior onDuplicate
    Returns
    Type Description
    Se_GenericEffectContainer

    CreateDamage(SourceType, float, float)

    Declaration
    public DamageData CreateDamage(DamageData.SourceType type, float amount, float procCoefficient = 1)
    Parameters
    Type Name Description
    DamageData.SourceType type
    float amount
    float procCoefficient
    Returns
    Type Description
    DamageData

    CreateStatusEffect(Type, Entity, CastInfo, Action<StatusEffect>)

    Create a new status effect and attach it to an entity.

    This can return null if the creation fails:

    e.g. Trying to apply a status effect with isKilledByUnstoppable flag to an unstoppable/invulnerable entity.

    Declaration
    public StatusEffect CreateStatusEffect(Type type, Entity victim, CastInfo info, Action<StatusEffect> beforePrepare = null)
    Parameters
    Type Name Description
    System.Type type
    Entity victim
    CastInfo info
    System.Action<T><StatusEffect> beforePrepare
    Returns
    Type Description
    StatusEffect

    CreateStatusEffect<T>(T, Entity, CastInfo, Action<T>)

    Create a new status effect and attach it to an entity.

    This can return null if the creation fails:

    e.g. Trying to apply a status effect with isKilledByUnstoppable flag to an unstoppable/invulnerable entity.

    Declaration
    public T CreateStatusEffect<T>(T prefab, Entity victim, CastInfo info, Action<T> beforePrepare = null) where T : StatusEffect
    Parameters
    Type Name Description
    T prefab
    Entity victim
    CastInfo info
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CreateStatusEffect<T>(Entity, CastInfo, Action<T>)

    Create a new status effect and attach it to an entity.

    This can return null if the creation fails:

    e.g. Trying to apply a status effect with isKilledByUnstoppable flag to an unstoppable/invulnerable entity.

    Declaration
    public T CreateStatusEffect<T>(Entity victim, CastInfo info, Action<T> beforePrepare = null) where T : StatusEffect
    Parameters
    Type Name Description
    Entity victim
    CastInfo info
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    CustomDestroyRoutine()

    Declaration
    public void CustomDestroyRoutine()

    CustomRpc_ClearClientMessageHandlers()

    Declaration
    public void CustomRpc_ClearClientMessageHandlers()

    CustomRpc_ClearServerMessageHandlers()

    Declaration
    public void CustomRpc_ClearServerMessageHandlers()

    CustomRpc_RegisterClientMessageHandler<T>(Action<T>)

    Register a client RPC handler. (server to clients) Registering multiple handlers for same type will result in all handlers passed being called.

    Declaration
    public void CustomRpc_RegisterClientMessageHandler<T>(Action<T> handler)
    Parameters
    Type Name Description
    System.Action<T><T> handler
    Type Parameters
    Name Description
    T

    CustomRpc_RegisterServerMessageHandler<T>(Action<T>)

    Register a server RPC handler. (client to server) Registering multiple handlers for same type will result in all handlers passed being called.

    Declaration
    public void CustomRpc_RegisterServerMessageHandler<T>(Action<T> handler)
    Parameters
    Type Name Description
    System.Action<T><T> handler
    Type Parameters
    Name Description
    T

    CustomRpc_RegisterServerMessageHandler<T>(string, Action<T, DewPlayer>)

    Register a server RPC handler. (client to server) Registering multiple handlers for same type will result in all handlers passed being called.
    This variant allows you to receive the caller client as a parameter.

    Declaration
    public void CustomRpc_RegisterServerMessageHandler<T>(string type, Action<T, DewPlayer> handler)
    Parameters
    Type Name Description
    string type
    System.Action<T1, T2><T, DewPlayer> handler
    Type Parameters
    Name Description
    T

    CustomRpc_SendMessageToAllClients<T>(T)

    Make a remote procedure call: Server => All Clients

    Declaration
    public void CustomRpc_SendMessageToAllClients<T>(T msg)
    Parameters
    Type Name Description
    T msg
    Type Parameters
    Name Description
    T

    CustomRpc_SendMessageToClient<T>(DewPlayer, T)

    Make a remote procedure call: Server => Specific Client

    Declaration
    public void CustomRpc_SendMessageToClient<T>(DewPlayer target, T msg)
    Parameters
    Type Name Description
    DewPlayer target
    T msg
    Type Parameters
    Name Description
    T

    CustomRpc_SendMessageToServer<T>(T)

    Make a remote procedure call: Client => Server
    Hosts can also make use of this RPC.

    Declaration
    public void CustomRpc_SendMessageToServer<T>(T msg)
    Parameters
    Type Name Description
    T msg
    Type Parameters
    Name Description
    T

    CustomRpc_UnregisterClientMessageHandler<T>()

    Declaration
    public void CustomRpc_UnregisterClientMessageHandler<T>()
    Type Parameters
    Name Description
    T

    CustomRpc_UnregisterClientMessageHandler<T>(Action<T>)

    Declaration
    public void CustomRpc_UnregisterClientMessageHandler<T>(Action<T> handler)
    Parameters
    Type Name Description
    System.Action<T><T> handler
    Type Parameters
    Name Description
    T

    CustomRpc_UnregisterServerMessageHandler<T>()

    Declaration
    public void CustomRpc_UnregisterServerMessageHandler<T>()
    Type Parameters
    Name Description
    T

    CustomRpc_UnregisterServerMessageHandler<T>(Action<T, DewPlayer>)

    Declaration
    public void CustomRpc_UnregisterServerMessageHandler<T>(Action<T, DewPlayer> handler)
    Parameters
    Type Name Description
    System.Action<T1, T2><T, DewPlayer> handler
    Type Parameters
    Name Description
    T

    CustomRpc_UnregisterServerMessageHandler<T>(Action<T>)

    Declaration
    public void CustomRpc_UnregisterServerMessageHandler<T>(Action<T> handler)
    Parameters
    Type Name Description
    System.Action<T><T> handler
    Type Parameters
    Name Description
    T

    DealDamage(DamageData, Entity, ReactionChain)

    Deal custom damage to the target entity.

    Declaration
    public void DealDamage(DamageData damage, Entity target, ReactionChain chain = default)
    Parameters
    Type Name Description
    DamageData damage
    Entity target
    ReactionChain chain

    DefaultDamage(float, float)

    Declaration
    public DamageData DefaultDamage(float amount, float procCoefficient = 1)
    Parameters
    Type Name Description
    float amount
    float procCoefficient
    Returns
    Type Description
    DamageData

    Destroy()

    Destroy this actor.

    It will do its own cleanups on server and then despawn.

    This is irreversible.

    Declaration
    public void Destroy()

    DestroyIfActive()

    Declaration
    public void DestroyIfActive()

    DoBasicAttackHit(Entity, bool, bool, float, float)

    Make the parent entity do basic attack and deal damage to the target entity.

    By design this should be only used by basic attacks.

    This triggers Attack Effects if the hit was successful.

    Declaration
    public void DoBasicAttackHit(Entity target, bool isCriticalHit, bool isMain, float damage, float attackEffect)
    Parameters
    Type Name Description
    Entity target
    bool isCriticalHit
    bool isMain
    float damage
    float attackEffect

    DoHeal(HealData, Entity, ReactionChain)

    Heal an entity by some amount.

    Declaration
    public void DoHeal(HealData heal, Entity target, ReactionChain chain = default)
    Parameters
    Type Name Description
    HealData heal
    Entity target
    ReactionChain chain

    DoManaHeal(HealData, Entity, ReactionChain)

    Grant an entity some mana.

    Declaration
    public void DoManaHeal(HealData heal, Entity target, ReactionChain chain = default)
    Parameters
    Type Name Description
    HealData heal
    Entity target
    ReactionChain chain

    ExcludeFromRoomSave()

    Mark this actor as excluded from room save.

    Declaration
    public void ExcludeFromRoomSave()

    FindData<T>(Predicate<T>)

    Declaration
    public T FindData<T>(Predicate<T> predicate)
    Parameters
    Type Name Description
    System.Predicate<T><T> predicate
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    FindFirstAncestorOfType<T>()

    Find first actor that matches the given type in this actor's ancestor tree.

    Declaration
    public T FindFirstAncestorOfType<T>() where T : Actor
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    FindFirstOfType<T>()

    Find first actor that matches the given type in this actor's ancestor tree including itself.

    Declaration
    public T FindFirstOfType<T>() where T : Actor
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    FrameUpdate()

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

    GetActorReadableName()

    Declaration
    public virtual string GetActorReadableName()
    Returns
    Type Description
    string

    GetData<T>()

    Declaration
    public T GetData<T>()
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetNetworkAuthorityConnection()

    Declaration
    protected virtual NetworkConnectionToClient GetNetworkAuthorityConnection()
    Returns
    Type Description
    Mirror.NetworkConnectionToClient

    GetOriginalName()

    Get the original name of this actor, excluding (Clone) or variant suffixes.
    Useful when trying to figure out id of name-linked resources.

    Declaration
    public string GetOriginalName()
    Returns
    Type Description
    string

    GiveShield(Entity, float, float, bool, ReactionChain)

    Declaration
    public Se_GenericShield_OneShot GiveShield(Entity victim, float amount, float duration, bool isDecay = false, ReactionChain chain = default)
    Parameters
    Type Name Description
    Entity victim
    float amount
    float duration
    bool isDecay
    ReactionChain chain
    Returns
    Type Description
    Se_GenericShield_OneShot

    HasData<T>()

    Declaration
    public bool HasData<T>()
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    Heal(float)

    Declaration
    public HealData Heal(float amount)
    Parameters
    Type Name Description
    float amount
    Returns
    Type Description
    HealData

    HideOnScreenTimerLocally(OnScreenTimerHandle)

    Declaration
    public void HideOnScreenTimerLocally(OnScreenTimerHandle handle)
    Parameters
    Type Name Description
    OnScreenTimerHandle handle

    IsDescendantOf(Actor)

    Is this actor a descendant of the given actor?

    Is the given actor this actor's ancestor (parent/grand-parent/grand-grand-parent...)?

    Declaration
    public bool IsDescendantOf(Actor actor)
    Parameters
    Type Name Description
    Actor actor
    Returns
    Type Description
    bool

    IsDescendantOf<T>()

    Is this actor a descendant of the given actor?

    Is the given actor this actor's ancestor (parent/grand-parent/grand-grand-parent...)?

    Declaration
    public bool IsDescendantOf<T>() where T : Actor
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    IsExcludedFromRoomSave()

    Is this actor marked as excluded from room saves?

    Declaration
    public bool IsExcludedFromRoomSave()
    Returns
    Type Description
    bool

    LockDestroy()

    Prevent this actor from being destroyed. You MUST call UnlockDestroy() after LockDestroy() call.

    Declaration
    public void LockDestroy()

    LogicUpdate(float)

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

    MagicDamage(float, float)

    Declaration
    public DamageData MagicDamage(float amount, float procCoefficient = 1)
    Parameters
    Type Name Description
    float amount
    float procCoefficient
    Returns
    Type Description
    DamageData

    OnCreate()

    Called everywhere when this actor is created.

    Declaration
    protected virtual void OnCreate()

    OnCreate_ActorData()

    Declaration
    public void OnCreate_ActorData()

    OnDestroyActor()

    Called everywhere when this actor is being destroyed. This is different from similarly-named Unity event OnDestroy, as it is called before GameObject itself gets destroyed.

    Declaration
    protected virtual void OnDestroyActor()

    OnDisable()

    Declaration
    protected virtual void OnDisable()

    OnEnable()

    Declaration
    protected virtual void OnEnable()

    OnPrepare()

    Called on server right before actor is spawned. Configure this actor's initial state here.

    Declaration
    protected virtual void OnPrepare()

    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()

    OnStopClient()

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

    OnStopServer()

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

    PhysicalDamage(float, float)

    Declaration
    public DamageData PhysicalDamage(float amount, float procCoefficient = 1)
    Parameters
    Type Name Description
    float amount
    float procCoefficient
    Returns
    Type Description
    DamageData

    ProcessShieldAmount(float, Entity)

    Declaration
    public float ProcessShieldAmount(float amount, Entity target)
    Parameters
    Type Name Description
    float amount
    Entity target
    Returns
    Type Description
    float

    ProcessSpawnedChildVarDefProcessor(ref VariantDef, Type)

    Declaration
    public void ProcessSpawnedChildVarDefProcessor(ref VariantDef data, Type childType)
    Parameters
    Type Name Description
    VariantDef data
    System.Type childType

    PureDamage(float, float)

    Declaration
    public DamageData PureDamage(float amount, float procCoefficient = 1)
    Parameters
    Type Name Description
    float amount
    float procCoefficient
    Returns
    Type Description
    DamageData

    RefundMana(float, Entity)

    Refund a certain amount of mana to an entity.

    This will not be processed, will not proc any callbacks nor display a mana heal number text.

    This shouldn't be used anywhere other than for canceled channels.

    Declaration
    public void RefundMana(float amount, Entity target)
    Parameters
    Type Name Description
    float amount
    Entity target

    RemoveData(object)

    Declaration
    public bool RemoveData(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool

    RemoveData<T>()

    Declaration
    public bool RemoveData<T>()
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    ResetCooldown(AbilityTrigger, bool)

    Declaration
    public void ResetCooldown(AbilityTrigger trigger, bool ignoreCanReceiveCooldown = false)
    Parameters
    Type Name Description
    AbilityTrigger trigger
    bool ignoreCanReceiveCooldown

    ShouldBeSavedWithRoom()

    Should this actor be saved and loaded back in when revisiting nodes?
    This is checked on server on all active actors when changing rooms.

    Declaration
    public virtual bool ShouldBeSavedWithRoom()
    Returns
    Type Description
    bool

    ShowOnScreenTimerLocally(OnScreenTimerHandle)

    Show an on-screen timer with custom fill amount to local player.
    Null rawText will be automatically populated.

    Declaration
    public OnScreenTimerHandle ShowOnScreenTimerLocally(OnScreenTimerHandle handle)
    Parameters
    Type Name Description
    OnScreenTimerHandle handle
    Returns
    Type Description
    OnScreenTimerHandle

    SpawnEntity<T>(T, Vector3, Quaternion?, DewPlayer, int, Action<T>)

    Declaration
    public T SpawnEntity<T>(T entity, Vector3 pos, Quaternion? rot, DewPlayer owner, int level, Action<T> beforeSpawn = null) where T : Entity
    Parameters
    Type Name Description
    T entity
    UnityEngine.Vector3 pos
    UnityEngine.Quaternion? rot
    DewPlayer owner
    int level
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SpawnEntity<T>(Vector3, Quaternion?, DewPlayer, int, Action<T>)

    Declaration
    public T SpawnEntity<T>(Vector3 pos, Quaternion? rot, DewPlayer owner, int level, Action<T> beforeSpawn = null) where T : Entity
    Parameters
    Type Name Description
    UnityEngine.Vector3 pos
    UnityEngine.Quaternion? rot
    DewPlayer owner
    int level
    System.Action<T><T> beforeSpawn
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SpawnSummon<T>(Vector3, Quaternion?, Action<T>)

    Declaration
    public T SpawnSummon<T>(Vector3 position, Quaternion? rotation, Action<T> beforePrepare = null) where T : Summon
    Parameters
    Type Name Description
    UnityEngine.Vector3 position
    UnityEngine.Quaternion? rotation
    System.Action<T><T> beforePrepare
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SpendMana(float, Entity)

    Spend mana of the entity.

    Declaration
    public void SpendMana(float amount, Entity target)
    Parameters
    Type Name Description
    float amount
    Entity target

    Teleport(Entity, Vector3)

    Teleport an entity to the targeted position.

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

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

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    UnityEngine.Object.ToString()

    TrackKills(float, Action<EventInfoKill>)

    Report any kills with contribution of this actor's damage with given grace period.
    You must Stop() the tracker to properly dispose it.

    Declaration
    public KillTracker TrackKills(float gracePeriod, Action<EventInfoKill> callback)
    Parameters
    Type Name Description
    float gracePeriod
    System.Action<T><EventInfoKill> callback
    Returns
    Type Description
    KillTracker

    TriggerAttackEffects(Entity, float, AttackEffectType, ReactionChain)

    Declaration
    public void TriggerAttackEffects(Entity target, float strength, AttackEffectType type, ReactionChain chain = default)
    Parameters
    Type Name Description
    Entity target
    float strength
    AttackEffectType type
    ReactionChain chain

    TryFindData<T>(Predicate<T>, out T)

    Declaration
    public bool TryFindData<T>(Predicate<T> predicate, out T result)
    Parameters
    Type Name Description
    System.Predicate<T><T> predicate
    T result
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    TryGetData<T>(out T)

    Declaration
    public bool TryGetData<T>(out T data)
    Parameters
    Type Name Description
    T data
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    UnlockDestroy()

    Declaration
    public void UnlockDestroy()

    Explicit Interface Implementations

    ICleanup.canDestroy

    Declaration
    bool ICleanup.canDestroy { get; }
    Returns
    Type Description
    bool

    ICleanup.OnCleanup()

    Declaration
    void ICleanup.OnCleanup()

    ICustomDestroyRoutine.CustomDestroyRoutine()

    Declaration
    void ICustomDestroyRoutine.CustomDestroyRoutine()

    Implements

    ILogicUpdate
    ICleanup
    ICustomDestroyRoutine

    Extension Methods

    ActorCheck.IsNullOrInactive(Actor)
    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