public override void Execute(object data) { GameModel gm = GetModel <GameModel>(); gm.m_isPause = true; UIPause pause = GetView <UIPause>(); PauseArgs e = data as PauseArgs; pause.Show(e); }
public override void Execute(object data) { PauseArgs e = data as PauseArgs; GameModel gm = GetModel <GameModel>(); gm.IsPause = true; UIPause pause = GetView <UIPause>(); pause.txtCoins.text = e.coin.ToString(); pause.txtDistance.text = e.distance.ToString(); pause.txtScore.text = e.score.ToString(); pause.Show(); }
public override void Execute(object data) { PauseArgs e = data as PauseArgs; GameModel gm = GetModel <GameModel>(); gm.IsPause = true; UIPause pause = GetView <UIPause>(); pause.Show(); pause.ShowScore(e.distance, e.coin, e.score); }
public override void Excute(object data) { GameModel gameModel = GetModel <GameModel>(); gameModel.IsPause = true; PauseArgs args = (PauseArgs)data; UIPause pause = GetView <UIPause>(); pause.Coin = args.coin; pause.Distance = args.distance; pause.Score = args.score; pause.Show(); }
public override void Execute(object data = null) { GameModel gm = GetModel <GameModel>(); gm.IsPause = true; //显示暂停UI UIPause pause = GetView <UIPause>(); pause.Show(); PauseArgs e = data as PauseArgs; //更新UI pause.UpdateUI(e); }
public override void Execute(object data) { PauseArgs e = data as PauseArgs; Game.M_Instance.M_GM.M_IsPause = true; UIPause pause = MVC.GetView <UIPause>(); pause.Show(); pause.m_textCoin.text = e.M_Coin.ToString(); pause.m_textDis.text = e.M_Distance.ToString(); pause.m_textScore.text = e.M_Score.ToString(); PlayerAnim anim = MVC.GetView <PlayerAnim>(); anim.StopPlayerAnim(); }
private void Start() { GameManager.Instance.GameInput.Gameplay.Pause.performed += ctx => SetPauseState(); LevelDistance = FinishTransform.position.z - StartTransform.position.z; SpriteChangeTimer = 0; CurrentDistanceHandleSprite = LintuUI1; PausePanel.SetActive(false); PauseScript = PausePanel.GetComponent <UIPause>(); HUDActive = GameManager.Instance.HUD; if (!HUDActive) { DeactivateHUD(); } else { ActivateHUD(); } }
public override bool Open() { if (isFading) { return(false); } else { canvasObject.SetActive(true); buttonSelector.ForceSelect(); buttonSelector.StaySelect(); if (onMainMenu) { if (uiMainMenu == null) { UIBase tempUI; UIManager.Instance.uiDicitonary.TryGetValue(eUItype.MAIN, out tempUI); uiMainMenu = tempUI as UIMainMenu; } uiMainMenu.Close(); } else if (onPause) { if (uiPause == null) { UIBase tempUI; UIManager.Instance.uiDicitonary.TryGetValue(eUItype.PAUSE, out tempUI); uiPause = tempUI as UIPause; } uiPause.CloseMenu(); } StartCoroutine(ProcessFadeAlpha_Open()); return(true); } }
protected override void Init() { instance = this; musicCheckBox = transform.FindComponent <GUISingleCheckBox>("MusicCheckBox"); soundEffectCheckBox = transform.FindComponent <GUISingleCheckBox>("SoundEffectCheckBox"); quitBattleBtn = transform.FindComponent <GUISingleButton>("QuitBattleBtn"); continueBattleBtn = transform.FindComponent <GUISingleButton>("ContinueBattleBtn"); musicCheckBox.onClick = OnMusicCheckBoxClick; soundEffectCheckBox.onClick = OnSoundCheckBoxClick; //quitBattleBtn.onClick = OnQuitBattleBtnClick; continueBattleBtn.onButtonPress = OnContinueBattleBtnClick; quitBattleBtn.onButtonPress = OnQuitBattleBtnClick; if (SceneManager.GetActiveScene().name == GameLibrary.LGhuangyuan) { quitBattleBtn.text = "退出野外"; } else { quitBattleBtn.text = "退出关卡"; } }
void Start() { uipause = GetComponent <UIPause>(); }