Ejemplo n.º 1
0
        protected override void ButtonUpdate()
        {
            if (button[0].isSelected && (JoyStick.IsOnKeyDown(1) || JoyStick.IsOnKeyDown(8)))           // Continue
            {
                SoundControl.Stop();
                if (!game.isMuted)
                {
                    choose.Play(SoundControl.volumeAll, 0f, 0f);
                }


                //SoundControl.Pause();//SoundControl.Stop();
                //isEndScene = true;
                nowLoading = true;
            }
            if (button[1].isSelected && (JoyStick.IsOnKeyDown(1) || JoyStick.IsOnKeyDown(8)))           // Back to Menu
            {
                if (!game.isMuted)
                {
                    choose.Play(SoundControl.volumeAll, 0f, 0f);
                }
                SoundControl.Stop();
                SoundControl.IniMusic("Audio\\BGM\\menu_new", true);
                //isEndScene = true;

                //BackScene(game.stageNum + 4);//5
                game.hasReachedCheckPoint = false;
                game.tmpGameStatus        = new GameStatus();
                game.InitializeStack();
            }
            if ((!game.twoButtonMode && JoyStick.KEY(2) || game.twoButtonMode && JoyStick.KEY(5)) && game.avilityNum == 0)
            {
                if ((upperScene as Stage).reverse.ReduceTAS() != 0)
                {
                    SoundControl.Stop();
                    SoundControl.RestoreMusic();
                    SoundControl.Resume();
                    if (!game.isMuted)
                    {
                        (upperScene as Stage).reverse.PlaySound();
                    }
                    isEndScene = true;
                    (upperScene as Stage).player.isAlive         = true;
                    (upperScene as Stage).toGameOver             = false;
                    (upperScene as Stage).hasEffectedPlayerDeath = false;
                    (upperScene as Stage).reverse.StartReverse();
                    (upperScene as Stage).ResetDeathEffect();
                }
            }

            if (hasDisplayed)
            {
                game.ReloadStage(game.isHighLvl);
                isEndScene = true;
            }
        }