Beispiel #1
0
 public override void onClosed()
 {
     if (CurSport != null)
     {
         CurSport.onClose();
         CurSport = null;
     }
     if (a3_getJewelryWay.instance && a3_getJewelryWay.instance.closeWin != null && Toclose)
     {
         InterfaceMgr.getInstance().ui_async_open(a3_getJewelryWay.instance.closeWin);
         a3_getJewelryWay.instance.closeWin = null;
     }
 }
Beispiel #2
0
        void onTab(string name)
        {
            for (int i = 0; i < Con_view.childCount; i++)
            {
                Con_view.GetChild(i).GetComponent <Button>().interactable = true;
            }
            Con_view.FindChild(name).GetComponent <Button>().interactable = false;

            if (CurSport != null && CurSport.sport_Name == name)
            {
                return;
            }

            foreach (Basesport sp in sport_Dic.Values)
            {
                if (sp != null)
                {
                    sp.sport_Obj.SetActive(false);
                }
            }
            if (!sport_Dic.ContainsKey(name) || sport_Dic[name] == null)
            {
                GameObject prefab = null;
                GameObject panel  = null;
                switch (name)
                {
                case "sports_jdzc":
                    prefab          = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_sports_jdzc");
                    panel           = GameObject.Instantiate(prefab) as GameObject;
                    sport_Dic[name] = new a3_sports_jdzc(panel.transform, name);
                    break;

                case "sports_jjc":
                    prefab          = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_sports_jjc");
                    panel           = GameObject.Instantiate(prefab) as GameObject;
                    sport_Dic[name] = new a3_sports_jjc(panel.transform, name);
                    break;
                }
                panel.transform.SetParent(contents, false);
            }
            CurSport?.onClose();
            CurSport = sport_Dic[name];
            CurSport?.onShowed();
            CurSport?.gameObject.SetActive(true);
        }