Beispiel #1
0
 public static void SwapMateria(Armor before, Armor after, Character c)
 {
     for (int i = 0; i < before.Slots.Length; i++)
     {
         Materia m = before.Slots[i];
         if (m != null)
         {
             if (i > after.Slots.Length)
             {
                 m.Detach(c);
                 Materiatory.Put(m);
             }
             else
             {
                 after.Slots[i] = m;
             }
         }
         before.Slots[i] = null;
     }
 }
Beispiel #2
0
        public override void ControlHandle(Key k)
        {
            switch (k)
            {
            case Key.Up:
                if (option > 0)
                {
                    option--;
                }
                break;

            case Key.Down:
                if (option < 3)
                {
                    option++;
                }
                break;

            case Key.Circle:
                switch (option)
                {
                case 0:
                    Materiatory.Sort();
                    break;

                case 1:
                    break;

                case 2:
                    for (int i = 0; i < Selected.Weapon.Slots.Length; i++)
                    {
                        Materia orb = Selected.Weapon.Slots[i];
                        if (orb != null)
                        {
                            Selected.Weapon.Slots[i] = null;
                            orb.Detach(Selected);
                            Materiatory.Put(orb);
                        }
                    }
                    for (int j = 0; j < Selected.Armor.Slots.Length; j++)
                    {
                        Materia orb = Selected.Armor.Slots[j];
                        if (orb != null)
                        {
                            Selected.Armor.Slots[j] = null;
                            orb.Detach(Selected);
                            Materiatory.Put(orb);
                        }
                    }
                    break;

                case 3:
                    MenuScreen.MateriaScreen.ChangeControl(MateriaList.Instance);
                    MateriaList.Instance.Trashing = true;
                    break;

                default: break;
                }
                break;

            case Key.X:
                Visible = false;
                MenuScreen.MateriaScreen.ChangeToDefaultControl();
                break;

            default: break;
            }
        }