Exemple #1
0
    public void Btn_Equip(string typeStr)
    {
        EquipmentType type = typeStr.AsEnum <EquipmentType>();

        // Close Equipment after inventory panel
        ItemCompareScreen.BtnHide();

        DeselectEquipSlot();

        switch (type)
        {
        case EquipmentType.Helm:
            HelmSelector.GetRect().DOScaleX(1f, 0.2f);
            break;

        case EquipmentType.Chest:
            ChestSelector.GetRect().DOScaleX(1f, 0.2f);
            break;

        case EquipmentType.Gloves:
            GlovesSelector.GetRect().DOScaleX(1f, 0.2f);
            break;

        case EquipmentType.Boots:
            BootsSelector.GetRect().DOScaleX(1f, 0.2f);
            break;

        case EquipmentType.Artifact:
            ArtifactSelector.GetRect().DOScaleX(1f, 0.2f);
            break;

        case EquipmentType.Weapon:
            WeaponSelector.GetRect().DOScaleX(1f, 0.2f);
            break;
        }

        // Keep the [Equip | Sell] popup around until the player finished confirming:
        ItemDetailsInterface.KEEP_UNTIL_CONFIRMED = Equipped.ContainsKey(type);

        // Load Inventory for Item Type
        if (!Equipped.ContainsKey(type))
        {
            ItemDetailsScreen.ShowItem(null, type, this, TryEquip);
        }
        else
        {
            ItemDetailsScreen.ShowItem(Equipped[type], type, this, TryEquip);
        }

        InventoryScreen.LoadInventory(type, TryEquip, this);
    }
Exemple #2
0
 public void BtnEquip()
 {
     InventoryScreen.LoadInventory(type, onEquip, heroInterface, true);
 }