Example #1
0
        void UpdateAttackDefenseUIElement(List <AttackDefenseSlot> list, AttackDefenseType type, string value, bool onTxt1 = false)
        {
            AttackDefenseSlot attackDefSlot = weaponInfo.GetAttackDefenseSlot(list, type);

            if (!onTxt1)
            {
                attackDefSlot.slot.text2.text = value;
            }
            else
            {
                attackDefSlot.slot.text1.text = value;
            }
        }
Example #2
0
        //Creating for additional effects
        void CreateAttackDefenseUIElementMini(List <AttackDefenseSlot> list, Transform parent, AttackDefenseType type)
        {
            AttackDefenseSlot attackDefense = new AttackDefenseSlot();

            attackDefense.type = type;
            list.Add(attackDefense);

            GameObject go = Instantiate(weaponInfo.slotMini) as GameObject;

            go.transform.SetParent(parent);
            go.transform.localScale = Vector3.one;

            attackDefense.slot            = go.GetComponent <InventoryUISlot>();
            attackDefense.slot.text1.text = "-";
            go.SetActive(true);
        }