예제 #1
0
    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);
    }
예제 #2
0
    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();
    }
예제 #3
0
    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);
    }
예제 #4
0
    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();
    }
예제 #5
0
    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);
    }
예제 #6
0
    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();
    }
예제 #7
0
 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();
     }
 }
예제 #8
0
    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);
        }
    }
예제 #9
0
파일: UIPause.cs 프로젝트: moto2002/moba
    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 = "退出关卡";
        }
    }
예제 #10
0
 void Start()
 {
     uipause = GetComponent <UIPause>();
 }