void OnBtnCollection() { if (mState == VIEW_STATE.Collection) { return; } BCSoundPlayer.Play(MusicEnum.button); mState = VIEW_STATE.Collection; mTabView.ChangeState(wpBtnCollection.button.transform.localPosition, wpBtnCollection.title, mTabCollection.gameObject); mTabMonster.ViewWillDiappear(); mTabMonster.ViewDidHidden(); mTabMonster.gameObject.SetActive(false); mTabCollection.gameObject.SetActive(true); mTabCollection.ViewDidShow(); }
public override void showView() { viewDidLoad(); base.showView(); Time.timeScale = 0; if (isMonster) { // mTabMonster.ESetActive(true); //mTabMonster.InitShowBearView(); // mState = VIEW_STATE.Monster; // mTabView.InitState(wpBtnMonster.button.transform.localPosition, wpBtnMonster.title, mTabMonster.gameObject); // //mTabCollection. //mTabCollection.ViewDidHidden(); mTabCollection.ESetActive(false); //OnBtnMonster(); } else { mState = VIEW_STATE.Collection; mTabView.InitState(wpBtnCollection.button.transform.localPosition, wpBtnCollection.title, mTabCollection.gameObject); mTabMonster.ESetActive(false); mTabCollection.ESetActive(true); mTabCollection.ViewWillShow(); } tsContent.transform.localScale = tsContent.from; tsContent.ESetActive(true); tsContent.PlayForward(); InvokeBlock(tsContent.duration, () => { showViewEnd(); }); }
public void show() { viewState = VIEW_STATE.Visible; timer1.Start(); }
public void hide() { viewState = VIEW_STATE.Hidden; timer1.Start(); }
public void hide() { viewState = VIEW_STATE.Hidden; timer1.Start(); contentPanel.Visible = false; }
public void show() { viewState = VIEW_STATE.Visible; timer1.Start(); contentPanel.Visible = false; }
public void CloseCurrentView() { mViewState = VIEW_STATE.NONE; currentViewCtrl.hiddenView(); }
public void ViewControllerDoAct(BTN_ACT act, System.Action <MDAlertBehaviour, VIEW_STATE> myCallBack = null) { switch (act) { case BTN_ACT.ITEM: mViewState = VIEW_STATE.ITEM; currentViewCtrl = WGItemView.CreateItemView(); break; case BTN_ACT.MONSTER: mViewState = VIEW_STATE.ITEM; currentViewCtrl = WGItemView.CreateItemView(true); break; case BTN_ACT.SHOP: mViewState = VIEW_STATE.SHOP; currentViewCtrl = WGShopView.CreateShopView(); break; case BTN_ACT.Achievement: mViewState = VIEW_STATE.Achievement; currentViewCtrl = WGAchievementView.CreateAchievementView(); break; case BTN_ACT.OTHER: mViewState = VIEW_STATE.OTHER; currentViewCtrl = WGHelpView.CreateHelpView(); break; case BTN_ACT.HuaFei: mViewState = VIEW_STATE.HuaFei; currentViewCtrl = V2DuiHuaFeiView.CreateDuiHuaFeiView(); break; // case BTN_ACT.Sign: // mViewState = VIEW_STATE.Sign; // currentViewCtrl = WGDailyRewardView.CreateDailyView(); // break; } mTempViewState = mViewState; SDK.AddChild(currentViewCtrl.gameObject, WGRootManager.Self.goRootGameUI); currentViewCtrl.showView(); currentViewCtrl.alertViewBehavriour = (ab, view) => { if (myCallBack != null) { myCallBack(ab, mViewState); } freshMenuButton(); switch (ab) { case MDAlertBehaviour.DID_SHOW: break; case MDAlertBehaviour.DID_HIDDEN: if (mTempViewState != VIEW_STATE.HuaFei) { if (YeHuoSDK.bShowLuckGift) //close window lucky { WGGameWorld.Instance.ShowLuckyDaLiBao(); } } if (currentViewCtrl == view) { currentViewCtrl = null; } Destroy(view.gameObject); mTempViewState = VIEW_STATE.NONE; break; case MDAlertBehaviour.CLICK_OK: mViewState = VIEW_STATE.NONE; view.hiddenView(); break; } }; }