Class Entity
A living being with an health bar. e.g. Travelers, Spiders, Breakable Rocks, Merchants
Inheritance
object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
Mirror.NetworkBehaviour
Entity
Assembly: Dew.Core.dll
Syntax
[LogicUpdatePriority(-400)]
[RequireComponent(typeof(EntityAI))]
[RequireComponent(typeof(EntityAnimation))]
[RequireComponent(typeof(EntityControl))]
[RequireComponent(typeof(EntityStatus))]
[RequireComponent(typeof(EntityVisual))]
[RequireComponent(typeof(EntityAbility))]
[RequireComponent(typeof(EntitySound))]
public class Entity : Actor, ILogicUpdate, ICleanup, ICustomDestroyRoutine
Fields
ClientEntityEvent_OnIsSleepingChanged
Declaration
public SafeAction<bool> ClientEntityEvent_OnIsSleepingChanged
Field Value
ClientEntityEvent_OnStatusEffectAdded
Declaration
public SafeAction<EventInfoStatusEffect> ClientEntityEvent_OnStatusEffectAdded
Field Value
ClientEntityEvent_OnStatusEffectRemoved
Declaration
public SafeAction<EventInfoStatusEffect> ClientEntityEvent_OnStatusEffectRemoved
Field Value
EntityEvent_OnAttackDodged
Declaration
public SafeAction<EventInfoAttackMissed> EntityEvent_OnAttackDodged
Field Value
EntityEvent_OnAttackEffectTriggered
Declaration
public SafeAction<EventInfoAttackEffect> EntityEvent_OnAttackEffectTriggered
Field Value
EntityEvent_OnAttackFired
Declaration
public SafeAction<EventInfoAttackFired> EntityEvent_OnAttackFired
Field Value
EntityEvent_OnAttackFiredBeforePrepare
Declaration
public SafeAction<EventInfoAttackFired> EntityEvent_OnAttackFiredBeforePrepare
Field Value
EntityEvent_OnAttackHit
Declaration
public SafeAction<EventInfoAttackHit> EntityEvent_OnAttackHit
Field Value
EntityEvent_OnAttackMissed
Declaration
public SafeAction<EventInfoAttackMissed> EntityEvent_OnAttackMissed
Field Value
EntityEvent_OnAttackTaken
Declaration
public SafeAction<EventInfoAttackHit> EntityEvent_OnAttackTaken
Field Value
EntityEvent_OnCastComplete
Declaration
public SafeAction<EventInfoCast> EntityEvent_OnCastComplete
Field Value
EntityEvent_OnCastCompleteBeforePrepare
Declaration
public SafeAction<EventInfoCast> EntityEvent_OnCastCompleteBeforePrepare
Field Value
EntityEvent_OnDamageNegatedByImmunity
Declaration
public SafeAction<EventInfoDamageNegatedByImmunity> EntityEvent_OnDamageNegatedByImmunity
Field Value
EntityEvent_OnDamageNegatedByShield
Declaration
public SafeAction<EventInfoDamageNegatedByShield> EntityEvent_OnDamageNegatedByShield
Field Value
EntityEvent_OnDeath
Declaration
public SafeAction<EventInfoKill> EntityEvent_OnDeath
Field Value
EntityEvent_OnGetManaSpent
Declaration
public SafeAction<EventInfoSpentMana> EntityEvent_OnGetManaSpent
Field Value
EntityEvent_OnTakeDamage
Declaration
public SafeAction<EventInfoDamage> EntityEvent_OnTakeDamage
Field Value
EntityEvent_OnTakeHeal
Declaration
public SafeAction<EventInfoHeal> EntityEvent_OnTakeHeal
Field Value
EntityEvent_OnTakeManaHeal
Declaration
public SafeAction<EventInfoHeal> EntityEvent_OnTakeManaHeal
Field Value
EntityEvent_OnTakeShield
Declaration
public SafeAction<EventInfoShield> EntityEvent_OnTakeShield
Field Value
takenDamageProcessor
Processor for all received damages (Except pure damage). This is only valid on server.
Declaration
public DataProcessorGroup<DamageData, Actor, Entity> takenDamageProcessor
Field Value
takenHealProcessor
Processor for received heals. This is only valid on server.
Declaration
public DataProcessorGroup<HealData, Actor, Entity> takenHealProcessor
Field Value
takenManaHealProcessor
Processor for received mana heals. This is only valid on server.
Declaration
public DataProcessorGroup<HealData, Actor, Entity> takenManaHealProcessor
Field Value
takenShieldProcessor
Processor for received shields. This is only valid on server.
Declaration
public DataProcessorGroup<HealData, Actor, Entity> takenShieldProcessor
Field Value
Properties
Ability
Declaration
public EntityAbility Ability { get; }
Property Value
agentPosition
Declaration
public Vector3 agentPosition { get; }
Property Value
| Type |
Description |
| UnityEngine.Vector3 |
|
AI
Declaration
public EntityAI AI { get; }
Property Value
Animation
Declaration
public EntityAnimation Animation { get; }
Property Value
Control
Declaration
public EntityControl Control { get; }
Property Value
currentHealth
Declaration
public float currentHealth { get; }
Property Value
currentMana
Declaration
public float currentMana { get; }
Property Value
defaultOwner
Declaration
protected virtual DewPlayer defaultOwner { get; }
Property Value
isAlive
Declaration
public bool isAlive { get; }
Property Value
isDead
Declaration
public bool isDead { get; }
Property Value
isSleeping
Declaration
public bool isSleeping { get; }
Property Value
lastSection
Section that this entity resided in. Even though an entity leaves a section, this variable will not be cleared.
Available on server. Can be null.
Declaration
public RoomSection lastSection { get; }
Property Value
level
Declaration
public int level { get; }
Property Value
maxHealth
Declaration
public float maxHealth { get; }
Property Value
maxMana
Declaration
public float maxMana { get; }
Property Value
normalizedHealth
Declaration
public float normalizedHealth { get; }
Property Value
normalizedMana
Declaration
public float normalizedMana { get; }
Property Value
owner
Declaration
[SaveVar(SaveVarFlags.Default)]
public DewPlayer owner { get; set; }
Property Value
section
Section that this entity resides in. Available on server.
Can be null.
Declaration
public RoomSection section { get; }
Property Value
Sound
Declaration
public EntitySound Sound { get; }
Property Value
Status
Declaration
public EntityStatus Status { get; }
Property Value
Visual
Declaration
public EntityVisual Visual { get; }
Property Value
Methods
ActiveLogicUpdate(float)
Declaration
protected override void ActiveLogicUpdate(float dt)
Parameters
| Type |
Name |
Description |
| float |
dt |
|
Overrides
AIUpdate(ref EntityAIContext)
AI update will not fire if entity is channeling an ability.
Declaration
protected virtual void AIUpdate(ref EntityAIContext context)
Parameters
Awake()
Declaration
protected override void Awake()
Overrides
CanAggroTo(Entity)
Declaration
public virtual bool CanAggroTo(Entity target)
Parameters
| Type |
Name |
Description |
| Entity |
target |
|
Returns
CheckEnemyOrNeutral(Entity)
Declaration
public bool CheckEnemyOrNeutral(Entity target)
Parameters
| Type |
Name |
Description |
| Entity |
target |
|
Returns
GetActorReadableName()
Declaration
public override string GetActorReadableName()
Returns
Overrides
GetNetworkAuthorityConnection()
Declaration
protected override NetworkConnectionToClient GetNetworkAuthorityConnection()
Returns
| Type |
Description |
| Mirror.NetworkConnectionToClient |
|
Overrides
GetRelation(Entity)
Declaration
public EntityRelation GetRelation(Entity other)
Parameters
| Type |
Name |
Description |
| Entity |
other |
|
Returns
GetStaggerSettings()
Declaration
protected virtual Entity.StaggerSettings GetStaggerSettings()
Returns
GetTeamRelation(DewPlayer)
Declaration
public TeamRelation GetTeamRelation(DewPlayer other)
Parameters
Returns
Kill()
Kill this entity. Note this can be prevented by death interrupts.
Declaration
KillNoInterrupt()
Kill this entity ignoring any death interrupts.
Declaration
public void KillNoInterrupt()
LoadEntityModelLocal()
Declaration
public virtual void LoadEntityModelLocal()
OnDeath(EventInfoKill)
Called everywhere when this entity dies.
Declaration
protected virtual void OnDeath(EventInfoKill info)
Parameters
OnDestroyActor()
Declaration
protected override void OnDestroyActor()
Overrides
OnDrawGizmos()
Declaration
protected virtual void OnDrawGizmos()
OnModelLoaded()
Declaration
public virtual void OnModelLoaded()
OnPrepare()
Declaration
protected override void OnPrepare()
Overrides
OnStartServer()
Declaration
public override void OnStartServer()
Overrides
OnStopServer()
Declaration
public override void OnStopServer()
Overrides
ProcessReceivedDamage(ref DamageData, Actor)
Process the given damage with this entity's received damage preprocessors.
Declaration
public void ProcessReceivedDamage(ref DamageData data, Actor actor)
Parameters
ProcessReceivedHeal(ref HealData, Actor)
Process the given heal with this entity's received heal preprocessors.
Declaration
public void ProcessReceivedHeal(ref HealData data, Actor actor)
Parameters
ProcessReceivedManaHeal(ref HealData, Actor)
Process the given mana heal with this entity's received mana heal preprocessors.
Declaration
public void ProcessReceivedManaHeal(ref HealData data, Actor actor)
Parameters
ProcessReceivedShield(ref HealData, Actor)
Declaration
public void ProcessReceivedShield(ref HealData data, Actor actor)
Parameters
ShouldBeSavedWithRoom()
Declaration
public override bool ShouldBeSavedWithRoom()
Returns
Overrides
Sleep()
Declaration
Stagger(Vector3?)
Declaration
public void Stagger(Vector3? dir)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3? |
dir |
|
WakeUp()
Declaration
Implements
Extension Methods