Ejemplo n.º 1
0
        public void EnterRunePopView(System.Object obj, RunePopType type)
        {
            for (int i = 0; i < this.transform.childCount; i++)
            {
                transform.GetChild(i).gameObject.SetActive(false);
            }
            switch (type)
            {
            case RunePopType.PageRenameUI:
                runePageRenameUIScript.gameObject.SetActive(true);
                runePageRenameUIScript.Init((RenameEntity)obj);
                runePageRenameUIScript.exitEvent = Close;
                break;

            case RunePopType.RuneSellUI:
                runeSellUIScript.gameObject.SetActive(true);
                runeSellUIScript.Init((SellEntity)obj);
                runeSellUIScript.exitEvent = Close;
                break;

            case RunePopType.RuneBuyUI:

                runeBuyUIScript.gameObject.SetActive(true);
                runeBuyUIScript.Init((BuyEntity)obj);
                runeBuyUIScript.exitEvent = Close;
                break;

            case RunePopType.RuneContrastPanel:
                runeContrasUIScript.gameObject.SetActive(true);
                runeContrasUIScript.Init((RuneContrast)obj);
                runeContrasUIScript.exitEvent = Close;
                break;

            case RunePopType.RunePageBuyUI:
                runeBuyPageScript.gameObject.SetActive(true);
                runeBuyPageScript.Init((BuyPageEntity)obj);
                runeBuyPageScript.exitEvent = Close;
                break;

            case RunePopType.RuneSlotBuyUI:
                runeBuySlotScript.gameObject.SetActive(true);
                runeBuySlotScript.Init((SlotEntity)obj);
                runeBuySlotScript.exitEvent = Close;
                break;

            default:
                break;
            }
        }
Ejemplo n.º 2
0
 private void ShowRunePopViewUI(System.Object boj, RunePopType reunpoptype)
 {
     if (isflag)
     {
         UIManager.Instance.GetUIByType(UIType.RunePopView, (ViewBase ui, System.Object param) => { (ui as RunePopView).EnterRunePopView(boj, reunpoptype); });
     }
     else
     {
         string     path        = "Prefabs/UI/RunePopView";
         GameObject runepopview = Instantiate(Resources.Load(path), transform.parent.parent.Find("Layer_Five")) as GameObject;
         runepopview.transform.localPosition = Vector3.zero;
         runepopview.transform.localRotation = Quaternion.identity;
         runeController = runepopview.AddComponent <RunePopView>();
         runeController.EnterRunePopView(boj, reunpoptype);
     }
 }