Example #1
0
        void UpdatePlayerControl()
        {
            float cursor = Input.GetAxisRaw("Horizontal") + Input.GetAxisRaw("Vertical");

            if ((cursor < -0.5f) && (lastCursor > -0.5f))
            {
                SoundController.Play(SoundController.SeType.MoveCursor);
                GameParams.PrevSelectStage();
                UpdateStageName();
            }
            else if ((cursor > 0.5f) && (lastCursor < 0.5f))
            {
                SoundController.Play(SoundController.SeType.MoveCursor);
                GameParams.NextSelectStage();
                UpdateStageName();
            }
            lastCursor = cursor;

            if (GameParams.IsActionAndWaterButtonDown)
            {
                state = StateType.None;
                SoundController.Play(SoundController.SeType.Decision);
                StageSelectCamera.SetAnim(StageSelectCamera.AnimType.Start);
                SceneChanger.ChangeScene(SceneChanger.SceneType.Game);
            }
            else if (Input.GetButtonDown("Esc"))
            {
                state = StateType.None;
                SoundController.Play(SoundController.SeType.Decision);
                StageSelectCamera.SetAnim(StageSelectCamera.AnimType.ToTitle);
                SceneChanger.ChangeScene(SceneChanger.SceneType.Title);
            }
        }
Example #2
0
 /// <summary>
 /// 次のステージを自動的に更新
 /// </summary>
 void SelectNextStage()
 {
     if (GameParams.ClearedStageCount < GameParams.StageMax)
     {
         GameParams.NextSelectStage();
         UpdateStageName();
     }
 }
Example #3
0
        void updateTitle()
        {
            if (GameParams.IsActionAndWaterButtonDown)
            {
                SoundController.Play(SoundController.SeType.Decision);

                if (!IsContinue)
                {
                    GameParams.SetNewGame();
                }
                else
                {
                    GameParams.SetContinue();
                }
                SceneChanger.ChangeScene(SceneChanger.SceneType.StageSelect);
                return;
            }

            if (Input.GetButtonDown("Esc"))
            {
                SoundController.Play(SoundController.SeType.MoveCursor);

#if UNITY_EDITOR
                UnityEditor.EditorApplication.isPlaying = false;
#else
                Application.Quit();
#endif
                return;
            }

            // 動画再生チェック
            if ((Time.time - startTime) > movieInterval)
            {
                StartMovie();
                return;
            }

            // クリアステージがなければ変更なし
            if (GameParams.ClearedStageCount == 0)
            {
                return;
            }

            if ((Input.GetAxisRaw("Horizontal") > 0) && !IsContinue)
            {
                SoundController.Play(SoundController.SeType.MoveCursor);
                IsContinue = true;
                startTime  = Time.time;
            }
            else if ((Input.GetAxisRaw("Horizontal") < 0) && IsContinue)
            {
                SoundController.Play(SoundController.SeType.MoveCursor);
                IsContinue = false;
                startTime  = Time.time;
            }
        }
Example #4
0
        private void Update()
        {
            if (Fade.IsFading ||
                SceneChanger.NextScene != SceneChanger.SceneType.None ||
                SceneChanger.NowScene != SceneChanger.SceneType.Title)
            {
                return;
            }

            if (GameParams.IsActionAndWaterButtonDown)
            {
                SoundController.Play(SoundController.SeType.Decision);

                if (!IsContinue)
                {
                    GameParams.SetNewGame();
                }
                else
                {
                    GameParams.SetContinue();
                }
                SceneChanger.ChangeScene(SceneChanger.SceneType.StageSelect);
                return;
            }

            if (Input.GetButtonDown("Esc"))
            {
#if UNITY_EDITOR
                UnityEditor.EditorApplication.isPlaying = false;
#else
                Application.Quit();
#endif
                return;
            }

            // クリアステージがなければ変更なし
            if (GameParams.ClearedStageCount == 0)
            {
                return;
            }

            if (Input.GetAxisRaw("Horizontal") > 0)
            {
                SoundController.Play(SoundController.SeType.MoveCursor);
                IsContinue = true;
            }
            else if (Input.GetAxisRaw("Horizontal") < 0)
            {
                SoundController.Play(SoundController.SeType.MoveCursor);
                IsContinue = false;
            }
        }
        void UpdatePlayerControl()
        {
            float cursor = Input.GetAxisRaw("Horizontal") + Input.GetAxisRaw("Vertical");

            if ((cursor < -0.5f) && (lastCursor > -0.5f))
            {
                GameParams.PrevSelectStage();
            }
            else if ((cursor > 0.5f) && (lastCursor < 0.5f))
            {
                GameParams.NextSelectStage();
            }
            lastCursor = cursor;

            if (GameParams.IsActionAndWaterButtonDown)
            {
                SceneChanger.ChangeScene(SceneChanger.SceneType.Game);
            }
        }
Example #6
0
 /// <summary>
 /// クリア処理をして、ステージ選択シーンへ移行します。
 /// 飛び立つアニメから、完了時に呼び出します。
 /// </summary>
 public void ClearAndStageSelect()
 {
     GameParams.StageClear();
     SceneChanger.ChangeScene(SceneChanger.SceneType.StageSelect);
 }