Example #1
0
 public SpellSlots(Texture2D texture, Texture2D spellSymbol, SpriteFont font, SpellsClass spell, int x, int y, SoundEffect crystalsound, int image) : base(texture, 2, 1, x, y)
 {
     symbol = new AllFather(spellSymbol, 1, 32, mainRec.X + 10, y + 10);
     symbol.currentFrame = image;
     symbol.mainRec.X    = x + mainRec.Width - symbol.mainRec.Width - 10;
     this.crystalsound   = crystalsound;
     originYPost         = y;
     this.font           = font;
     this.spell          = spell;
     this.text           = SpellText(spell.GetText());
 }
Example #2
0
 public virtual void AddSpell(SpellsClass input)
 {
 }
Example #3
0
 public override void AddSpell(SpellsClass input)
 {
     if (spellList.Contains(input))
     {
         for (int i = 0; i < spellList.Count(); i++)
         {
             if (spellList[i] != null)
             {
                 if (spellList[i].Equals(input))
                 {
                     for (int p = i; p < spellList.Count() - 1; p++)
                     {
                         spellList[p] = spellList[p + 1];
                     }
                     spellList[spellList.Count - 1] = null;
                     break;
                 }
             }
         }
     }
     else
     {
         if (spellList.Contains(null))
         {
             List <SpellsClass> temp  = new List <SpellsClass>();
             List <SpellsClass> temp2 = new List <SpellsClass>();
             for (int i = 0; i < spellList.Count; i++)
             {
                 if (spellList[i] == null)
                 {
                     temp2.Add(null);
                 }
                 else
                 {
                     temp.Add(spellList[i]);
                 }
             }
             spellList.Clear();
             spellList.AddRange(temp);
             spellList.AddRange(temp2);
             for (int i = spellList.Count - 1; i >= 0; i--)
             {
                 if (i - 1 < 0)
                 {
                 }
                 else if (spellList[i - 1] != null)
                 {
                     spellList[i] = input;
                     break;
                 }
             }
         }
         else
         {
             for (int i = 0; i < spellList.Count - 1; i++)
             {
                 spellList[i] = spellList[i + 1];
             }
         }
         spellList[spellList.Count - 1] = input;
     }
 }
Example #4
0
 public void AddSpell(SpellsClass input)
 {
     soldier.AddSpell(input);
 }