Example #1
0
        public void OnValueChange()
        {
            int index = 0;

            if (popupList.value != null)
            {
                index = popupList.GetItemsInt();
                list  = (Global.List)index;
            }
            else
            {
                switch (list)
                {
                case Global.List.leader:
                    popupList.value = "领导牌";
                    break;

                case Global.List.special:
                    popupList.value = "特殊牌";
                    break;

                case Global.List.monster:
                    popupList.value = "生物牌";
                    break;

                case Global.List.neutral:
                    popupList.value = "中立牌";
                    break;
                }
                return;
            }

            for (int i = 0; i < popupList.items.Count; i++)
            {
                if (i == index)
                {
                    grids[i].SetActive(true);
                }
                else
                {
                    grids[i].SetActive(false);
                }
            }
        }
Example #2
0
 public void LineChanged()
 {
     totalLine = popupList.GetItemsInt();
     Show(showBehavior, PlayerController.GetInstance().grids[totalLine + 2], true);
 }