Beispiel #1
0
        private void EquipmentDragDrop()
        {
            if (InputHelper.InputConfirmReleased())
            {
                switch (DragAndDropEquipment.EquipmentType)
                {
                case EquipmentTypes.Etc:
                    if (MouseHelper.MouseStateCurrent.X >= 366 && MouseHelper.MouseStateCurrent.X < 366 + 37 &&
                        MouseHelper.MouseStateCurrent.Y >= 359 && MouseHelper.MouseStateCurrent.Y < 359 + 37)
                    {
                        PlayerInventory.SetEtc(DragAndDropEquipment);
                    }
                    break;

                case EquipmentTypes.Head:
                    if (MouseHelper.MouseStateCurrent.X >= 446 && MouseHelper.MouseStateCurrent.X < 446 + 37 &&
                        MouseHelper.MouseStateCurrent.Y >= 355 && MouseHelper.MouseStateCurrent.Y < 355 + 37)
                    {
                        PlayerInventory.SetHead(DragAndDropEquipment);
                    }
                    break;

                case EquipmentTypes.Armor:
                    if (MouseHelper.MouseStateCurrent.X >= 452 && MouseHelper.MouseStateCurrent.X < 452 + 37 &&
                        MouseHelper.MouseStateCurrent.Y >= 396 && MouseHelper.MouseStateCurrent.Y < 396 + 37)
                    {
                        PlayerInventory.SetArmor(DragAndDropEquipment);
                    }
                    break;

                case EquipmentTypes.WeaponOption:
                    if (MouseHelper.MouseStateCurrent.X >= 383 && MouseHelper.MouseStateCurrent.X < 383 + 37 &&
                        MouseHelper.MouseStateCurrent.Y >= 434 && MouseHelper.MouseStateCurrent.Y < 434 + 37)
                    {
                        PlayerInventory.SetWeaponOption(DragAndDropEquipment);
                    }
                    break;

                case EquipmentTypes.Booster:
                    if (MouseHelper.MouseStateCurrent.X >= 481 && MouseHelper.MouseStateCurrent.X < 481 + 37 &&
                        MouseHelper.MouseStateCurrent.Y >= 462 && MouseHelper.MouseStateCurrent.Y < 462 + 37)
                    {
                        PlayerInventory.SetBooster(DragAndDropEquipment);
                    }
                    break;

                case EquipmentTypes.Shoes:
                    if (MouseHelper.MouseStateCurrent.X >= 389 && MouseHelper.MouseStateCurrent.X < 389 + 37 &&
                        MouseHelper.MouseStateCurrent.Y >= 521 && MouseHelper.MouseStateCurrent.Y < 521 + 37)
                    {
                        PlayerInventory.SetShoes(DragAndDropEquipment);
                    }
                    break;
                }

                DragAndDropEquipment = null;
            }
        }
 private void InitArmor(string ArmorToEquip)
 {
     for (int E = 0; E < Equipment.ListEquipment.Count; E++)
     {
         MenuEquipment ActiveEquipment = Equipment.ListEquipment[E];
         if (ActiveEquipment.Name == ArmorToEquip)
         {
             Equipment.SetArmor(ActiveEquipment);
         }
     }
 }