Пример #1
0
 void CycleSpellForward()
 {
     if (!isCasting && !isSwitching)
     {
         isSwitching = true;
         currentSpell.UnEquip(this);
         int currentIndex = acquiredSpells.IndexOf(currentSpell);
         if (currentIndex == acquiredSpells.Count - 1)
         {
             spellIndex   = 0;
             currentSpell = acquiredSpells[0];
         }
         else
         {
             spellIndex++;
             currentSpell = acquiredSpells[spellIndex];
         }
         currentSpell.Equip(this);
     }
 }