Exemple #1
0
    void InspectArmor(Armor armor)
    {
        inspectingArmor = armor;
        SelectedCard.SetData(armor.ItemName, "", null, armor.DamageBlock);
        SelectedCard.gameObject.SetActive(true);

        EquipButton.interactable = true;
    }
Exemple #2
0
    void SelectTab(EquipmentTab tab)
    {
        ClearChildren();

        selectedTab = tab;
        if (tab == EquipmentTab.ArmorTab)
        {
            Debug.Log("EqC: Armor Tab");
            ClearInspection();
            //ARMOR
            if (player.EquippedArmor)
            {
                EquippedCard.SetData(player.EquippedArmor.ItemName, "", player.EquippedArmor.IconSprite, player.EquippedArmor.DamageBlock);
            }
            else
            {
                EquippedCard.SetData("Nude!?", "", null, player.BlockDamage);
            }
            //ArmorTab.transform.position += new Vector3(0, -1 * TabSelectedOffset, 0);
            (ArmorTab.transform as RectTransform).anchoredPosition  = new Vector2(0, -1 * TabSelectedOffset);
            (WeaponTab.transform as RectTransform).anchoredPosition = Vector2.zero;

            FillAvailableArmors();
        }
        else
        {
            Debug.Log("EqC: Weapon Tab");
            ClearInspection();
            //WEAPON
            if (player.EquippedWeapon)
            {
                EquippedCard.SetData(player.EquippedWeapon.ItemName, "", player.EquippedWeapon.IconSprite, player.EquippedWeapon.MinDamage, player.EquippedWeapon.MaxDamage);
            }
            else
            {
                EquippedCard.SetData("Unarmed", "", null, player.AttackDamage, player.AttackDamage);
            }
            (ArmorTab.transform as RectTransform).anchoredPosition  = Vector2.zero;
            (WeaponTab.transform as RectTransform).anchoredPosition = new Vector2(0, -1 * TabSelectedOffset);

            FillAvailableWeapons();
        }
    }