Exemple #1
0
 public void SetSpellCast(SpellCast cast)
 {
     if (m_spellCast != null && m_spellCast != cast)
     {
         m_spellCast.Dispose();
     }
     m_spellCast = cast;
 }
Exemple #2
0
 public void Dispose()
 {
     Target = null;
     Entity.Dispose();
     if (SpellCast != null)
     {
         SpellCast.Dispose();
     }
 }
Exemple #3
0
    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;
    }
Exemple #4
0
        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);
        }