Пример #1
0
    private void SwitchGroup()
    {
        int i;
        int count = smallList.items.Count;

        for (i = 0; i < count; i++)
        {
            GameObject     item    = smallList.items[i];
            SkillSmallItem itemCtr = item.GetComponent <SkillSmallItem>();
            if (itemCtr.skillTempletGroupInfo.index == selectGroupIndex)
            {
                bugger.iconId       = itemCtr.skillTempletGroupInfo.GetGroupId();
                itemCtr.toggle.isOn = true;
            }
        }
    }
Пример #2
0
    private void CreateSmallItem(SkillGroupInfo skillTempletGroupInfo, int index)
    {
        GameObject item = smallList.NewItem();

        PosUtil.SetCellPos(item.transform, index - 2, -5);

        item.name = "skill_" + skillTempletGroupInfo.GetGroupId();

        SkillSmallItem itemCtr = item.GetComponent <SkillSmallItem>();

        itemCtr.toggle.group          = smallToggleGroup;
        itemCtr.skillTempletGroupInfo = skillTempletGroupInfo;
        itemCtr.ShowName("");
        itemCtr.icon = skillTempletGroupInfo.GetGroupId();
        EventTriggerListener.Get(item).onClick = OnSmallClick;
        itemCtr.selectTempletEvent            += OnSelectTemplet;
    }
Пример #3
0
    private void OnSmallClick(GameObject gameObject)
    {
        SkillSmallItem itemCtr = gameObject.GetComponent <SkillSmallItem>();

        bugger.iconId = itemCtr.skillTempletGroupInfo.GetGroupId();
    }