public void SetSpellCast(SpellCast cast) { if (m_spellCast != null && m_spellCast != cast) { m_spellCast.Dispose(); } m_spellCast = cast; }
public void Dispose() { Target = null; Entity.Dispose(); if (SpellCast != null) { SpellCast.Dispose(); } }
public void Dispose() { target = null; health = null; mainResourse = null; parameters = null; states = null; GlobalCooldown.Dispose(); GlobalCooldown = null; SpellCast.Dispose(); SpellCast = null; Buffs.Dispose(); Buffs = null; Spells.Dispose(); Spells = null; AbsorbEffects.Clear(); AbsorbEffects = null; PeriodicEffects.Clear(); PeriodicEffects = null; PreviousTargets.Clear(); PreviousTargets = null; for (int i = 0; i < CharacterEventTypes.Count; i++) { CharacterEvents[i].Clear(); } CharacterEvents.Clear(); CharacterEvents = null; }
public void Update(TimeSpan elapsedGameTime, bool maybeBuffChanged) { Entity.Update(elapsedGameTime, maybeBuffChanged); if (SpellCast != null) { if (!SpellCast.Update(Entity, elapsedGameTime)) { SpellCast.Dispose(); SpellCast = null; } } if (Entity.IsModelChanged && Entity.CurrentReplacedModel != null) { Entity.CurrentReplacedModel.Update(elapsedGameTime); } else { Sprite.Update(elapsedGameTime); } GlobalCooldown.Update(elapsedGameTime); }