Skip to content

Class: Actor ​

csharp
[SelectionBase]
[DewResourceLink(ResourceLinkBy.Type)]
public class Actor : DewNetworkBehaviour, ILogicUpdate, ICleanup, ICustomDestroyRoutine

Fields ​

NameDeclarationDescription
ActorEvent_OnAbilityInstanceBeforePreparepublic SafeAction<EventInfoAbilityInstance> ActorEvent_OnAbilityInstanceBeforePrepareNote that ActorEvents can also be from its descendants.
ActorEvent_OnAbilityInstanceCreatedpublic SafeAction<EventInfoAbilityInstance> ActorEvent_OnAbilityInstanceCreatedNote that ActorEvents can also be from its descendants.
ActorEvent_OnApplyElementalpublic SafeAction<EventInfoApplyElemental> ActorEvent_OnApplyElementalNote that ActorEvents can also be from its descendants.
ActorEvent_OnAttackEffectTriggeredpublic SafeAction<EventInfoAttackEffect> ActorEvent_OnAttackEffectTriggeredNote that ActorEvents can also be from its descendants.
ActorEvent_OnAttackHitpublic SafeAction<EventInfoAttackHit> ActorEvent_OnAttackHitNote that ActorEvents can also be from its descendants.
ActorEvent_OnDealDamagepublic SafeAction<EventInfoDamage> ActorEvent_OnDealDamageNote that ActorEvents can also be from its descendants.
ActorEvent_OnDoHealpublic SafeAction<EventInfoHeal> ActorEvent_OnDoHealNote that ActorEvents can also be from its descendants.
ActorEvent_OnDoManaHealpublic SafeAction<EventInfoHeal> ActorEvent_OnDoManaHealNote that ActorEvents can also be from its descendants.
ActorEvent_OnGiveShieldpublic SafeAction<EventInfoShield> ActorEvent_OnGiveShieldNote that ActorEvents can also be from its descendants.
ActorEvent_OnKillpublic SafeAction<EventInfoKill> ActorEvent_OnKillNote that ActorEvents can also be from its descendants.
ActorEvent_OnSpawnSummonpublic SafeAction<EventInfoSummon> ActorEvent_OnSpawnSummonNote that ActorEvents can also be from its descendants.
ActorEvent_OnSpendManapublic SafeAction<EventInfoSpentMana> ActorEvent_OnSpendManaNote that ActorEvents can also be from its descendants.
childrenpublic readonly List<Actor> childrenAlive, non-destroyed children actors.
childrenInNetworkpublic readonly List<Actor> childrenInNetworkChildren that are alive, or not yet despawned from the network.
ClientActorEvent_OnCreatepublic SafeAction<Actor> ClientActorEvent_OnCreateCalled everywhere when an actor is created including child actors.
ClientActorEvent_OnDestroyedpublic SafeAction<Actor> ClientActorEvent_OnDestroyedCalled everywhere when this actor is destroyed.
ClientEvent_OnPersistentSyncedDataChangedpublic SafeAction<string> ClientEvent_OnPersistentSyncedDataChanged
dealtCooldownReductionByRatioProcessorpublic DataProcessorGroup<CooldownReductionByRatioSettings, Actor, AbilityTrigger> dealtCooldownReductionByRatioProcessorProcessor 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.
dealtCooldownReductionProcessorpublic DataProcessorGroup<CooldownReductionSettings, Actor, AbilityTrigger> dealtCooldownReductionProcessorProcessor 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.
dealtDamageProcessorpublic DataProcessorGroup<DamageData, Actor, Entity> dealtDamageProcessorProcessor 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.
dealtHealProcessorpublic DataProcessorGroup<HealData, Actor, Entity> dealtHealProcessorProcessor for dealt heals. This is only valid on server.All heals from this actor will be processed by this and every ancestors' preprocessors.
dealtManaHealProcessorpublic DataProcessorGroup<HealData, Actor, Entity> dealtManaHealProcessorProcessor 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.
dealtShieldProcessorpublic DataProcessorGroup<HealData, Actor, Entity> dealtShieldProcessorProcessor for received shields. This is only valid on server.
KilledByUnstoppableEffectspublic static Type[] KilledByUnstoppableEffects
persistentData`[SaveVar(SaveVarFlags.Default)]
public readonly Dictionary<string, string> persistentData`Available on server. Generic persistent data storage that will be saved and loaded with this actor.
persistentSyncedData`[SaveVar(SaveVarFlags.Default)]
public readonly SyncDictionary<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)
ScaleDurationByTenacityEffectspublic static Type[] ScaleDurationByTenacityEffects
spawnedChildVarDefProcessorpublic DataProcessorGroup&lt;VariantDef, Actor, Type&gt; spawnedChildVarDefProcessor

Properties ​

NameDeclarationDescription
ancestorspublic IEnumerable&lt;Actor&gt; ancestors { get; }Enumerable ancestors of this actor. Ordering is the same as the actor tree order, first element being the direct parent.
chainTempNamepublic ReactionChain chainTempName { get; }Reaction chain of this actor. Available only on server.
creationTimepublic float creationTime { get; }Time of this actor's creation byTime.time.
firstEntitypublic Entity firstEntity { get; }The first entity in this actor's ancestor tree.This property can be used to e.g. find the caster of an ability instance.
firstTriggerpublic AbilityTrigger firstTrigger { get; }The first ability trigger in this actor's ancestor tree.This property can be used to e.g. find the ability instance's trigger.
isActivepublic bool isActive { get; }
isDestroyedpublic bool isDestroyed { get; }
isDestroyedOnRoomChangepublic virtual bool isDestroyedOnRoomChange { get; }
isDestroyLockedpublic bool isDestroyLocked { get; }Is someone preventing this actor from being destroyed? Available only on server.
isNewInstancepublic bool isNewInstance { get; }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.
parentActorpublic Actor parentActor { get; set; }
parentActorNetIdpublic uint parentActorNetId { get; }
persistentNetIdpublic uint persistentNetId { get; }Mirror setsnetIdto 0 on despawn. This property will tell you its former netId even after being despawned.
position`[SaveVar(SaveVarFlags.Default)]
public Vector3 position { get; set; }`Position of this actor. Same astransform.position.
rotation`[SaveVar(SaveVarFlags.Default)]
public Quaternion rotation { get; set; }`Rotation of this actor. Same astransform.rotation.

Methods ​

ActiveFrameUpdate() ​

Called everywhere every frame while this actor is active.

csharp
protected virtual void ActiveFrameUpdate()

ActiveLogicUpdate(float) ​

Called everywhere every logic tick while this actor is active.

csharp
protected virtual void ActiveLogicUpdate(float dt)

Parameters:

NameTypeDescription
dtfloat

AddData&lt;T&gt;(T) ​

csharp
public void AddData<T>(T data)

Parameters:

NameTypeDescription
dataT
``T

ApplyCooldownReduction(AbilityTrigger, CooldownReductionSettings) ​

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

csharp
public void ApplyCooldownReduction(AbilityTrigger trigger, CooldownReductionSettings settings)

Parameters:

NameTypeDescription
triggerAbilityTrigger
settingsCooldownReductionSettings

ApplyCooldownReduction(AbilityTrigger, float, bool, bool) ​

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

csharp
public void ApplyCooldownReduction(AbilityTrigger trigger, float amount, bool scaled = true, bool ignoreCanReceiveCooldown = false)

Parameters:

NameTypeDescription
triggerAbilityTrigger
amountfloat
scaledbool
ignoreCanReceiveCooldownbool

ApplyCooldownReductionByRatio(AbilityTrigger, CooldownReductionByRatioSettings) ​

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

csharp
public void ApplyCooldownReductionByRatio(AbilityTrigger trigger, CooldownReductionByRatioSettings settings)

Parameters:

NameTypeDescription
triggerAbilityTrigger
settingsCooldownReductionByRatioSettings

ApplyCooldownReductionByRatio(AbilityTrigger, float, bool) ​

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

csharp
public void ApplyCooldownReductionByRatio(AbilityTrigger trigger, float ratio, bool ignoreCanReceiveCooldown = false)

Parameters:

NameTypeDescription
triggerAbilityTrigger
ratiofloat
ignoreCanReceiveCooldownbool

ApplyElemental(ElementalType, Entity, int) ​

csharp
public ElementalStatusEffect ApplyElemental(ElementalType type, Entity to, int appliedStacks = 1)

Parameters:

NameTypeDescription
typeElementalType
toEntity
appliedStacksint

Returns: ElementalStatusEffect

Awake() ​

csharp
protected override void Awake()

ClearExcludeFromRoomSave() ​

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

csharp
public void ClearExcludeFromRoomSave()

CreateAbilityInstance(Type, Vector3, Quaternion?, CastInfo, Action&lt;AbilityInstance&gt;) ​

csharp
public AbilityInstance CreateAbilityInstance(Type type, Vector3 position, Quaternion? rotation, CastInfo info, Action<AbilityInstance> beforePrepare = null)

Parameters:

NameTypeDescription
typeSystem.Type
positionUnityEngine.Vector3
rotationUnityEngine.Quaternion?
infoCastInfo
beforePrepareSystem.Action<T><AbilityInstance>

Returns: AbilityInstance

CreateAbilityInstance&lt;T&gt;(T, Vector3, Quaternion?, CastInfo, Action&lt;T&gt;) ​

csharp
public T CreateAbilityInstance<T>(T prefab, Vector3 position, Quaternion? rotation, CastInfo info, Action<T> beforePrepare = null) where T : AbilityInstance

Parameters:

NameTypeDescription
prefabT
positionUnityEngine.Vector3
rotationUnityEngine.Quaternion?
infoCastInfo
beforePrepareSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

CreateAbilityInstance&lt;T&gt;(Vector3, Quaternion?, CastInfo, Action&lt;T&gt;) ​

csharp
public T CreateAbilityInstance<T>(Vector3 position, Quaternion? rotation, CastInfo info, Action<T> beforePrepare = null) where T : AbilityInstance

Parameters:

NameTypeDescription
positionUnityEngine.Vector3
rotationUnityEngine.Quaternion?
infoCastInfo
beforePrepareSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

CreateActor&lt;T&gt;(T, Vector3, Quaternion?, Action&lt;T&gt;) ​

csharp
public T CreateActor<T>(T prefab, Vector3 pos, Quaternion? rot, Action<T> beforePrepare = null) where T : Actor

Parameters:

NameTypeDescription
prefabT
posUnityEngine.Vector3
rotUnityEngine.Quaternion?
beforePrepareSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

CreateActor&lt;T&gt;(Vector3, Quaternion?, Action&lt;T&gt;) ​

csharp
public T CreateActor<T>(Vector3 pos, Quaternion? rot, Action<T> beforePrepare = null) where T : Actor

Parameters:

NameTypeDescription
posUnityEngine.Vector3
rotUnityEngine.Quaternion?
beforePrepareSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: 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.

csharp
public Se_GenericEffectContainer CreateBasicEffect(Entity victim, BasicEffect eff, float duration, string id = null, DuplicateEffectBehavior onDuplicate = DuplicateEffectBehavior.ReplacePrevious)

Parameters:

NameTypeDescription
victimEntity
effBasicEffect
durationfloat
idstring
onDuplicateDuplicateEffectBehavior

Returns: Se_GenericEffectContainer

CreateDamage(SourceType, float, float) ​

csharp
public DamageData CreateDamage(DamageData.SourceType type, float amount, float procCoefficient = 1)

Parameters:

NameTypeDescription
typeDamageData.SourceType
amountfloat
procCoefficientfloat

Returns: DamageData

CreateStatusEffect(Type, Entity, CastInfo, Action&lt;StatusEffect&gt;) ​

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.

csharp
public StatusEffect CreateStatusEffect(Type type, Entity victim, CastInfo info, Action<StatusEffect> beforePrepare = null)

Parameters:

NameTypeDescription
typeSystem.Type
victimEntity
infoCastInfo
beforePrepareSystem.Action<T><StatusEffect>

Returns: StatusEffect

CreateStatusEffect&lt;T&gt;(T, Entity, CastInfo, Action&lt;T&gt;) ​

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.

csharp
public T CreateStatusEffect<T>(T prefab, Entity victim, CastInfo info, Action<T> beforePrepare = null) where T : StatusEffect

Parameters:

NameTypeDescription
prefabT
victimEntity
infoCastInfo
beforePrepareSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

CreateStatusEffect&lt;T&gt;(Entity, CastInfo, Action&lt;T&gt;) ​

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.

csharp
public T CreateStatusEffect<T>(Entity victim, CastInfo info, Action<T> beforePrepare = null) where T : StatusEffect

Parameters:

NameTypeDescription
victimEntity
infoCastInfo
beforePrepareSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

CustomDestroyRoutine() ​

csharp
public void CustomDestroyRoutine()

CustomRpc_ClearClientMessageHandlers() ​

csharp
public void CustomRpc_ClearClientMessageHandlers()

CustomRpc_ClearServerMessageHandlers() ​

csharp
public void CustomRpc_ClearServerMessageHandlers()

CustomRpc_RegisterClientMessageHandler&lt;T&gt;(Action&lt;T&gt;) ​

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

csharp
public void CustomRpc_RegisterClientMessageHandler<T>(Action<T> handler)

Parameters:

NameTypeDescription
handlerSystem.Action&lt;T&gt;&lt;T&gt;
``T

CustomRpc_RegisterServerMessageHandler&lt;T&gt;(Action&lt;T&gt;) ​

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

csharp
public void CustomRpc_RegisterServerMessageHandler<T>(Action<T> handler)

Parameters:

NameTypeDescription
handlerSystem.Action&lt;T&gt;&lt;T&gt;
``T

CustomRpc_RegisterServerMessageHandler&lt;T&gt;(string, Action&lt;T, DewPlayer&gt;) ​

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.

csharp
public void CustomRpc_RegisterServerMessageHandler<T>(string type, Action<T, DewPlayer> handler)

Parameters:

NameTypeDescription
typestring
handlerSystem.Action<T1, T2><T,DewPlayer>
``T

CustomRpc_SendMessageToAllClients&lt;T&gt;(T) ​

Make a remote procedure call: Server => All Clients

csharp
public void CustomRpc_SendMessageToAllClients<T>(T msg)

Parameters:

NameTypeDescription
msgT
``T

CustomRpc_SendMessageToClient&lt;T&gt;(DewPlayer, T) ​

Make a remote procedure call: Server => Specific Client

csharp
public void CustomRpc_SendMessageToClient<T>(DewPlayer target, T msg)

Parameters:

NameTypeDescription
targetDewPlayer
msgT
``T

CustomRpc_SendMessageToServer&lt;T&gt;(T) ​

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

csharp
public void CustomRpc_SendMessageToServer<T>(T msg)

Parameters:

NameTypeDescription
msgT
``T

CustomRpc_UnregisterClientMessageHandler&lt;T&gt;() ​

csharp
public void CustomRpc_UnregisterClientMessageHandler<T>()

Parameters:

NameTypeDescription
``T

CustomRpc_UnregisterClientMessageHandler&lt;T&gt;(Action&lt;T&gt;) ​

csharp
public void CustomRpc_UnregisterClientMessageHandler<T>(Action<T> handler)

Parameters:

NameTypeDescription
handlerSystem.Action&lt;T&gt;&lt;T&gt;
``T

CustomRpc_UnregisterServerMessageHandler&lt;T&gt;() ​

csharp
public void CustomRpc_UnregisterServerMessageHandler<T>()

Parameters:

NameTypeDescription
``T

CustomRpc_UnregisterServerMessageHandler&lt;T&gt;(Action&lt;T, DewPlayer&gt;) ​

csharp
public void CustomRpc_UnregisterServerMessageHandler<T>(Action<T, DewPlayer> handler)

Parameters:

NameTypeDescription
handlerSystem.Action<T1, T2><T,DewPlayer>
``T

CustomRpc_UnregisterServerMessageHandler&lt;T&gt;(Action&lt;T&gt;) ​

csharp
public void CustomRpc_UnregisterServerMessageHandler<T>(Action<T> handler)

Parameters:

NameTypeDescription
handlerSystem.Action&lt;T&gt;&lt;T&gt;
``T

DealDamage(DamageData, Entity, ReactionChain) ​

Deal custom damage to the target entity.

csharp
public void DealDamage(DamageData damage, Entity target, ReactionChain chain = default)

Parameters:

NameTypeDescription
damageDamageData
targetEntity
chainReactionChain

DefaultDamage(float, float) ​

csharp
public DamageData DefaultDamage(float amount, float procCoefficient = 1)

Parameters:

NameTypeDescription
amountfloat
procCoefficientfloat

Returns: DamageData

Destroy() ​

Destroy this actor.It will do its own cleanups on server and then despawn.This is irreversible.

csharp
public void Destroy()

DestroyIfActive() ​

csharp
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.

csharp
public void DoBasicAttackHit(Entity target, bool isCriticalHit, bool isMain, float damage, float attackEffect)

Parameters:

NameTypeDescription
targetEntity
isCriticalHitbool
isMainbool
damagefloat
attackEffectfloat

DoHeal(HealData, Entity, ReactionChain) ​

Heal an entity by some amount.

csharp
public void DoHeal(HealData heal, Entity target, ReactionChain chain = default)

Parameters:

NameTypeDescription
healHealData
targetEntity
chainReactionChain

DoManaHeal(HealData, Entity, ReactionChain) ​

Grant an entity some mana.

csharp
public void DoManaHeal(HealData heal, Entity target, ReactionChain chain = default)

Parameters:

NameTypeDescription
healHealData
targetEntity
chainReactionChain

ExcludeFromRoomSave() ​

Mark this actor as excluded from room save.

csharp
public void ExcludeFromRoomSave()

FindData&lt;T&gt;(Predicate&lt;T&gt;) ​

csharp
public T FindData<T>(Predicate<T> predicate)

Parameters:

NameTypeDescription
predicateSystem.Predicate&lt;T&gt;&lt;T&gt;
``T

Returns: T

FindFirstAncestorOfType&lt;T&gt;() ​

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

csharp
public T FindFirstAncestorOfType<T>() where T : Actor

Parameters:

NameTypeDescription
``T

Returns: T

FindFirstOfType&lt;T&gt;() ​

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

csharp
public T FindFirstOfType<T>() where T : Actor

Parameters:

NameTypeDescription
``T

Returns: T

FrameUpdate() ​

csharp
public override void FrameUpdate()

GetActorReadableName() ​

csharp
public virtual string GetActorReadableName()

Returns: string

GetData&lt;T&gt;() ​

csharp
public T GetData<T>()

Parameters:

NameTypeDescription
``T

Returns: T

GetNetworkAuthorityConnection() ​

csharp
protected virtual NetworkConnectionToClient GetNetworkAuthorityConnection()

Returns: 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.

csharp
public string GetOriginalName()

Returns: string

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

csharp
public Se_GenericShield_OneShot GiveShield(Entity victim, float amount, float duration, bool isDecay = false, ReactionChain chain = default)

Parameters:

NameTypeDescription
victimEntity
amountfloat
durationfloat
isDecaybool
chainReactionChain

Returns: Se_GenericShield_OneShot

HasData&lt;T&gt;() ​

csharp
public bool HasData<T>()

Parameters:

NameTypeDescription
``T

Returns: bool

Heal(float) ​

csharp
public HealData Heal(float amount)

Parameters:

NameTypeDescription
amountfloat

Returns: HealData

HideOnScreenTimerLocally(OnScreenTimerHandle) ​

csharp
public void HideOnScreenTimerLocally(OnScreenTimerHandle handle)

Parameters:

NameTypeDescription
handleOnScreenTimerHandle

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...)?

csharp
public bool IsDescendantOf(Actor actor)

Parameters:

NameTypeDescription
actorActor

Returns: bool

IsDescendantOf&lt;T&gt;() ​

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

csharp
public bool IsDescendantOf<T>() where T : Actor

Parameters:

NameTypeDescription
``T

Returns: bool

IsExcludedFromRoomSave() ​

Is this actor marked as excluded from room saves?

csharp
public bool IsExcludedFromRoomSave()

Returns: bool

LockDestroy() ​

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

csharp
public void LockDestroy()

LogicUpdate(float) ​

csharp
public override void LogicUpdate(float dt)

Parameters:

NameTypeDescription
dtfloat

MagicDamage(float, float) ​

csharp
public DamageData MagicDamage(float amount, float procCoefficient = 1)

Parameters:

NameTypeDescription
amountfloat
procCoefficientfloat

Returns: DamageData

OnCreate() ​

Called everywhere when this actor is created.

csharp
protected virtual void OnCreate()

OnCreate_ActorData() ​

csharp
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.

csharp
protected virtual void OnDestroyActor()

OnDisable() ​

csharp
protected virtual void OnDisable()

OnEnable() ​

csharp
protected virtual void OnEnable()

OnPrepare() ​

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

csharp
protected virtual void OnPrepare()

OnStart() ​

csharp
public override void OnStart()

OnStartClient() ​

csharp
public override void OnStartClient()

OnStartServer() ​

csharp
public override void OnStartServer()

OnStopClient() ​

csharp
public override void OnStopClient()

OnStopServer() ​

csharp
public override void OnStopServer()

PhysicalDamage(float, float) ​

csharp
public DamageData PhysicalDamage(float amount, float procCoefficient = 1)

Parameters:

NameTypeDescription
amountfloat
procCoefficientfloat

Returns: DamageData

ProcessShieldAmount(float, Entity) ​

csharp
public float ProcessShieldAmount(float amount, Entity target)

Parameters:

NameTypeDescription
amountfloat
targetEntity

Returns: float

ProcessSpawnedChildVarDefProcessor(ref VariantDef, Type) ​

csharp
public void ProcessSpawnedChildVarDefProcessor(ref VariantDef data, Type childType)

Parameters:

NameTypeDescription
dataVariantDef
childTypeSystem.Type

PureDamage(float, float) ​

csharp
public DamageData PureDamage(float amount, float procCoefficient = 1)

Parameters:

NameTypeDescription
amountfloat
procCoefficientfloat

Returns: 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.

csharp
public void RefundMana(float amount, Entity target)

Parameters:

NameTypeDescription
amountfloat
targetEntity

RemoveData(object) ​

csharp
public bool RemoveData(object obj)

Parameters:

NameTypeDescription
objobject

Returns: bool

RemoveData&lt;T&gt;() ​

csharp
public bool RemoveData<T>()

Parameters:

NameTypeDescription
``T

Returns: bool

ResetCooldown(AbilityTrigger, bool) ​

csharp
public void ResetCooldown(AbilityTrigger trigger, bool ignoreCanReceiveCooldown = false)

Parameters:

NameTypeDescription
triggerAbilityTrigger
ignoreCanReceiveCooldownbool

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.

csharp
public virtual bool ShouldBeSavedWithRoom()

Returns: bool

ShowOnScreenTimerLocally(OnScreenTimerHandle) ​

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

csharp
public OnScreenTimerHandle ShowOnScreenTimerLocally(OnScreenTimerHandle handle)

Parameters:

NameTypeDescription
handleOnScreenTimerHandle

Returns: OnScreenTimerHandle

SpawnEntity&lt;T&gt;(T, Vector3, Quaternion?, DewPlayer, int, Action&lt;T&gt;) ​

csharp
public T SpawnEntity<T>(T entity, Vector3 pos, Quaternion? rot, DewPlayer owner, int level, Action<T> beforeSpawn = null) where T : Entity

Parameters:

NameTypeDescription
entityT
posUnityEngine.Vector3
rotUnityEngine.Quaternion?
ownerDewPlayer
levelint
beforeSpawnSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

SpawnEntity&lt;T&gt;(Vector3, Quaternion?, DewPlayer, int, Action&lt;T&gt;) ​

csharp
public T SpawnEntity<T>(Vector3 pos, Quaternion? rot, DewPlayer owner, int level, Action<T> beforeSpawn = null) where T : Entity

Parameters:

NameTypeDescription
posUnityEngine.Vector3
rotUnityEngine.Quaternion?
ownerDewPlayer
levelint
beforeSpawnSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

SpawnSummon&lt;T&gt;(Vector3, Quaternion?, Action&lt;T&gt;) ​

csharp
public T SpawnSummon<T>(Vector3 position, Quaternion? rotation, Action<T> beforePrepare = null) where T : Summon

Parameters:

NameTypeDescription
positionUnityEngine.Vector3
rotationUnityEngine.Quaternion?
beforePrepareSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

SpendMana(float, Entity) ​

Spend mana of the entity.

csharp
public void SpendMana(float amount, Entity target)

Parameters:

NameTypeDescription
amountfloat
targetEntity

Teleport(Entity, Vector3) ​

Teleport an entity to the targeted position.You should only feed in a valid position by usingDew.GetValidAgentPosition()beforehand.

csharp
public void Teleport(Entity entity, Vector3 position)

Parameters:

NameTypeDescription
entityEntity
positionUnityEngine.Vector3

ToString() ​

csharp
public override string ToString()

Returns: string

TrackKills(float, Action&lt;EventInfoKill&gt;) ​

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

csharp
public KillTracker TrackKills(float gracePeriod, Action<EventInfoKill> callback)

Parameters:

NameTypeDescription
gracePeriodfloat
callbackSystem.Action<T><EventInfoKill>

Returns: KillTracker

TriggerAttackEffects(Entity, float, AttackEffectType, ReactionChain) ​

csharp
public void TriggerAttackEffects(Entity target, float strength, AttackEffectType type, ReactionChain chain = default)

Parameters:

NameTypeDescription
targetEntity
strengthfloat
typeAttackEffectType
chainReactionChain

TryFindData&lt;T&gt;(Predicate&lt;T&gt;, out T) ​

csharp
public bool TryFindData<T>(Predicate<T> predicate, out T result)

Parameters:

NameTypeDescription
predicateSystem.Predicate&lt;T&gt;&lt;T&gt;
resultT
``T

Returns: bool

TryGetData&lt;T&gt;(out T) ​

csharp
public bool TryGetData<T>(out T data)

Parameters:

NameTypeDescription
dataT
``T

Returns: bool

UnlockDestroy() ​

csharp
public void UnlockDestroy()

Maintained by the Shape of Dreams Modding Community