public override void onClosed() { if (current != null) { current.onClose(); } if (GRMap.GAME_CAMERA != null) { GRMap.GAME_CAMERA.SetActive(true); } //if (a3_itemLack.intans && a3_itemLack.intans.closewindow != null ) //{ // if (Toclose) // { // if (a3_itemLack.intans.closewindow != this.uiName) // InterfaceMgr.getInstance().open(a3_itemLack.intans.closewindow); // a3_itemLack.intans.closewindow = null; // Toclose = false; // } // else { // if (!a3_itemLack.intans.noclear) // { // a3_itemLack.intans.closewindow = null; // a3_itemLack.intans.noclear = false; // } // } //} InterfaceMgr.getInstance().itemToWin(Toclose, this.uiName); }
private void OnSwitch(TabControl t) { int index = t.getSeletedIndex(); if (current != null) { if (currentTeam != null && teamList != null) { currentTeam.onClose(); currentTeam.gameObject.SetActive(false); teamList.onClose(); teamList.gameObject.SetActive(false); } current.onClose(); current.gameObject.SetActive(false); } if (index == 0) { if (legion == null) { GameObject prefab = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_legion"); GameObject panel = GameObject.Instantiate(prefab) as GameObject; legion = new a3_legion(panel.transform); legion.setPerent(con); legion.transform.localPosition = Vector3.zero; } current = legion; } else if (index == 1) { SetIndexToFriend(); } else { if (currentTeam == null) { GameObject prefab = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_currentTeamPanel"); GameObject panel = GameObject.Instantiate(prefab) as GameObject; currentTeam = new a3_currentTeamPanel(panel.transform); currentTeam.setPerent(con); } if (teamList == null) { GameObject prefab = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_teamPanel"); GameObject panel = GameObject.Instantiate(prefab) as GameObject; teamList = new a3_teamPanel(panel.transform); teamList.setPerent(con); } if (TeamProxy.getInstance().joinedTeam&& TeamProxy.getInstance().MyTeamData != null) { current = currentTeam; currentTeam.gameObject.SetActive(true); teamList.gameObject.SetActive(false); } else { current = teamList; currentTeam.gameObject.SetActive(false); teamList.gameObject.SetActive(true); } TeamProxy.getInstance().SetTeamPanelInfo(); } if (current != null) { current.onShowed(); current.visiable = true; } }