Exemple #1
0
    void InitBeforeAvility(string name, double value)
    {
        UIHeroAbilitySlot slot = null;

        for (int i = 0; i < beforeAvilityList.Count; i++)
        {
            if (beforeAvilityList[i].abilityID == name)
            {
                beforeAvilityList[i].InitSlot(name, value, noneColor);
                slot = beforeAvilityList[i];
            }
        }
        if (slot == null)
        {
            slot = ReturnToHeroAvilitySlot().GetComponent <UIHeroAbilitySlot>();
            slot.transform.SetParent(beforePanel, false);
            slot.InitSlot(name, value, noneColor);
            beforeAvilityList.Add(slot);
        }
    }
Exemple #2
0
    void InitAfterAvility(string name, double value)
    {
        UIHeroAbilitySlot slot = null;

        for (int i = 0; i < afterAvilityList.Count; i++)
        {
            if (afterAvilityList[i].abilityID == name)
            {
                Color color = ComparisonValue(name, value);
                afterAvilityList[i].InitSlot(name, value, color);
                slot = afterAvilityList[i];
            }
        }
        if (slot == null)
        {
            slot = ReturnToHeroAvilitySlot().GetComponent <UIHeroAbilitySlot>();
            slot.transform.SetParent(afterPanel, false);
            Color color = ComparisonValue(name, value);
            slot.InitSlot(name, value, color);
            afterAvilityList.Add(slot);
        }
    }