public static void OpenUI() { if (instance == null) { Object prefab = PrefabLoader.loadFromPack("LS/pbLSSevenDayRewardRoot"); if (prefab != null) { GameObject obj = Instantiate(prefab) as GameObject; RED.AddChild(obj, DBUIController.mDBUIInstance._bottomRoot); //RED.TweenShowDialog(obj); instance = obj.GetComponent <UISevenDayRewardMain> (); } } }
public void Back_OnClick() { mReward.DeleteCell(); NoticeManager.openSign = false; Destroy(gameObject); if (instance != null) { instance = null; } // DBUIController.mDBUIInstance.ShowFor2D_UI (); }
protected override void OnEvent(EventTypeDefine p_e, object p_param) { switch (p_e) { case EventTypeDefine.Click_DuoBaoButton: FinalTrialMgr.GetInstance().m_NowTaskId = Core.Data.guideManger.LastTaskID; FinalTrialMgr.GetInstance().m_LastTaskId = Core.Data.guideManger.LastTaskID; DBUIController.mDBUIInstance.SetViewState(EMViewState.S_QiangDuo); break; case EventTypeDefine.Click_MartialConference: FinalTrialMgr.GetInstance().m_NowTaskId = Core.Data.guideManger.LastTaskID; FinalTrialMgr.GetInstance().CreateScript(TrialEnum.TrialType_TianXiaDiYi, QiangduoEnum.QiangduoEnum_List); break; case EventTypeDefine.Click_Exchange_DuoBao: FinalTrialMgr.GetInstance().RequestByQiangduoType(QiangduoEnum.QiangduoEnum_Duihuan); // FinalTrialMgr.GetInstance().qiangDuoPanelScript.MoveToTarget(); break; case EventTypeDefine.Click_GetChaoShenShui: Core.Data.DuiHuanManager.buyZhanGongItem(1, 0); break; case EventTypeDefine.Click_BackToDuoBao: FinalTrialMgr.GetInstance().m_QiangduoEnum = QiangduoEnum.QiangduoEnum_Duihuan; FinalTrialMgr.GetInstance().qiangDuoPanelScript.OnBtnClose(); break; case EventTypeDefine.Click_DuoBaoBackToMain: DBUIController.mDBUIInstance.mDuoBaoView.OnBtnQuit(); break; case EventTypeDefine.Click_SevenRewardButton: UISevenDayRewardMain.OpenUI(); break; case EventTypeDefine.Click_GetSevenReward: UISevenDayRewardMain.GetInstance().mReward.mCellList[0].SendMsg(); Core.Data.guideManger.HideGuide(); break; case EventTypeDefine.Click_CloseSevenReward: UISevenDayRewardMain.GetInstance().Back_OnClick(); break; case EventTypeDefine.Click_RunTiaoZhanBtn: FinalTrialMgr.GetInstance().currentFightOpponentInfo = FinalTrialMgr.GetInstance().qiangDuoPanelScript.ListCell[0].fightOpponentInfo; Core.Data.temper._PvpEnemyName = FinalTrialMgr.GetInstance().qiangDuoPanelScript.ListCell[0].fightOpponentInfo.n; FinalTrialMgr.GetInstance().tianXiaDiYiFightRequest(FinalTrialMgr.GetInstance().qiangDuoPanelScript.ListCell[0].fightOpponentInfo.g, FinalTrialMgr.GetInstance().qiangDuoPanelScript.ListCell[0].fightOpponentInfo.r, EMViewState.S_QiangDuo, Core.Data.temper.gambleTypeId); Core.Data.guideManger.HideGuide(); break; case EventTypeDefine.Click_Shop: UIDragonMallMgr.GetInstance().OpenUI(ShopItemType.HotSale); break; case EventTypeDefine.Click_BuyFiveStarEgg: List <ItemData> mitems = Core.Data.itemManager.GetShopItem(ShopItemType.HotSale); ItemData _data = null; foreach (ItemData data in mitems) { if (data.ID == 110025) { _data = data; break; } } SecretShopMgr.GetInstance().SetSecretShopTag(true, _data, ShopItemType.HotSale, 2); break; case EventTypeDefine.Click_SureBuyFiveStarEgg: SecretShopMgr.GetInstance()._UISecretShopTag.Buy_OnClick(); Core.Data.guideManger.HideGuide(); break; case EventTypeDefine.Click_ExitShop: DBUIController.mDBUIInstance.mUIDragonMallMain.Back_OnClick(); break; case EventTypeDefine.UnLock_God_And_SecondPos: //Core.Data.guideManger.AutoRUN(); break; default: break; } }
public void SetViewState(EMViewState vs, EMBoxType bt = EMBoxType.NONE, object obj = null) { switch (vs) { case EMViewState.MainView: break; case EMViewState.S_ShenLong: DBUIController.mDBUIInstance.HiddenFor3D_UI(); UIShenLongManager.setShenLongManagerRoot(_bottomRoot); break; case EMViewState.S_FuBen: #if NEWPVE UIMiniPlayerController.ElementShowArray = new bool[] { true, false, true, true, true }; if (!_PVERoot.gameObject.activeSelf) { _PVERoot.gameObject.SetActive(true); } pveView.SetActive(true); TopMenuUI.OpenUI(); #else chapterView.SetActive(true); #endif DBUIController.mDBUIInstance.HiddenFor3D_UI(); break; case EMViewState.S_QiangDuo: UIMiniPlayerController.ElementShowArray = new bool[] { true, true, false, true, true }; FinalTrialMgr.GetInstance().getAllData(); // DBUIController.mDBUIInstance.HiddenFor3D_UI (); break; case EMViewState.S_Team_NoSelect: TeamUI.OpenUI(); HiddenFor3D_UI(false); break; case EMViewState.H_Bag: petBoxView.viewWillHidden(); break; case EMViewState.S_Bag: petBoxView.viewWillShow(); DBUIController.mDBUIInstance.HiddenFor3D_UI(); break; case EMViewState.S_Team_Select: HiddenFor3D_UI(false); TeamUI.OpenUI(); break; case EMViewState.S_CityFloor: //更新PVE系统Timer JCPVETimerManager.Instance.AutoOpenPVESystemTimer(); NewFloor floordata = Core.Data.newDungeonsManager.curFightingFloor; if (floordata != null && Core.Data.temper.warBattle.battleData.iswin == 1) { floordata.state = NewFloorState.Pass; if (floordata.config.ID > Core.Data.newDungeonsManager.lastFloorId) { int nextId = ++Core.Data.newDungeonsManager.lastFloorId; NewFloor nextfloordata = null; if (Core.Data.newDungeonsManager.FloorList.TryGetValue(nextId + 1, out nextfloordata)) { nextfloordata.state = NewFloorState.Current; } } } SQYMainController.mInstance.OnBtnFuBen(); bool isOpenDescribe = false; if ("PVEType_Plot" == Core.Data.newDungeonsManager.curFightingFBType) { if (DBUIController.battleAgain == true) { DBUIController.battleAgain = false; if (DBUIController.battleAgainID <= Core.Data.newDungeonsManager.lastFloorId) { JCPVEPlotController.tempOpenFloorID = DBUIController.battleAgainID; isOpenDescribe = true; } } } JCPVEMainController.Instance.OnBtnClick(Core.Data.newDungeonsManager.curFightingFBType); if (isOpenDescribe) { JCPVEPlotController.Instance.OnBuildingClick(DBUIController.battleAgainID.ToString()); } break; case EMViewState.HIDE_TEAM_VIEW: if (TeamUI.mInstance != null) { TeamUI.mInstance.CloseUI(); } break; case EMViewState.S_ShangCheng: UIDragonMallMgr.GetInstance().OpenUINew(ShopItemType.HotSale); break; case EMViewState.S_HuoDong: if (UIWXLActivityMainController.Instance != null) { UIWXLActivityMainController.Instance.SetActive(true); } else { UIWXLActivityMainController.CreateActivityMainPanel(DBUIController.mDBUIInstance._TopRoot); } //mActPanel.SetActive (true); ActivityNetController.GetInstance().SendLoginMSG(Core.Data.playerManager.PlayerID, null); break; case EMViewState.S_MosterCome: MonsterComePanel.SetActive(true); break; case EMViewState.S_XiaoXi: MessageMgr.GetInstance().SetInfoPanel(true); break; case EMViewState.S_SevenDaysReward: UISevenDayRewardMain.OpenUI(); // DBUIController.mDBUIInstance.HiddenFor3D_UI (); break; case EMViewState.S_Friend: { Core.Data.FriendManager.initFriendListInfo(); Core.Data.FriendManager.initSuDiListInfo(); Core.Data.FriendManager.initFriendRequestListInfo(); UIMainFriend.Instance.getFriendList(); UIMainFriend.Instance.setMainFriendRoot(_bottomRoot); UIMainFriend.Instance.gameObject.SetActive(false); } break; } if (bt != EMBoxType.NONE) { petBoxView.SetPetBoxType(bt); } }