void ShowCartoonBtn() { if (pveCartoonCtrl != null) { pveCartoonCtrl.OpenCartoonPanel(); } }
public static PVEDownloadCartoonController CreateCartoonPanel(NewFloorData tNewFD, bool isShow = false) { if (instance == null) { UnityEngine.Object obj = WXLLoadPrefab.GetPrefab(WXLPrefabsName.UIDownloadCartoonPanel); if (obj != null) { GameObject go = Instantiate(obj) as GameObject; DBUIController.mDBUIInstance._PVERoot.AddPage(go.name, go); PVEDownloadCartoonController fc = go.GetComponent <PVEDownloadCartoonController>(); instance = fc; Transform goTrans = go.transform; go.transform.parent = DBUIController.mDBUIInstance._PVERoot.transform; go.transform.localPosition = new Vector3(0, -580, 0); goTrans.localScale = Vector3.one; fc.curFD = tNewFD; if (isShow == true) { fc.OpenCartoonPanel(); } return(fc); } return(null); } else { RED.SetActive(true, instance.gameObject); instance.transform.parent = DBUIController.mDBUIInstance._PVERoot.transform; instance.transform.localPosition = new Vector3(0, -580, 0); instance.transform.localScale = Vector3.one; instance.curFD = tNewFD; instance.Start(); if (isShow == true) { instance.OpenCartoonPanel(); } return(instance); } }