Example #1
0
    /// <summary>
    /// ステージを選ぶ関数
    /// </summary>
    private void SelectStage()
    {
        //ステージを決定する処理
        if (!mainCameraObj.isRotation && !floorMove.isMoving &&
            !KeyLoader.keyLoader.StickWait && KeyLoader.keyLoader.A)
        {
            //modeを変更し、フロア選択に処理を移る
            mode = FLOOR_SELECT;
            SEMaster.Play(KeyInputSE.keyInoutSE.GetClip(KeyInputSE.Type.Decide));
            StartCoroutine(floorMove.SlidePut());
            floorBackSprite.SetImage();
            BestTimeNum.SetBestTime();
            floorTop.SetImage();
            floor = Menu.FLOOR1;

            floorNameManager.SetName();
            stCur.Set(false);

            KeyLoader.keyLoader.SetStickWait(RESET_STAGE_FRAME);
        }
        //タイトルに戻る処理
        else if (!mainCameraObj.isRotation && !floorMove.isMoving &&
                 !KeyLoader.keyLoader.StickWait && KeyLoader.keyLoader.B)
        {
            SEMaster.Play(KeyInputSE.keyInoutSE.GetClip(KeyInputSE.Type.Cancel));
            KeyLoader.keyLoader.SetKeyWait(Menu.FADE);
            FadeIO.fadeIo.FadeOut(Menu.FADE);
            BGMMaster.AudioFadeOutStart(Menu.FADE);
            SEMaster.AudioFadeOutStart(Menu.FADE);
            runningFunc = () => LoadTitleScene();
            StartCoroutine(RunCoroutine(Menu.FADE, runningFunc));
            KeyLoader.keyLoader.SetStickWait(RESET_STAGE_FRAME);
        }
        //ポーズ画面を開く処理
        else if (!mainCameraObj.isRotation && !floorMove.isMoving &&
                 !KeyLoader.keyLoader.StickWait && KeyLoader.keyLoader.StartKey)
        {
            temp = mode;
            mode = PAUSE;
            SEMaster.Play(KeyInputSE.keyInoutSE.GetClip(KeyInputSE.Type.Pause));
            pause.Open();

            stCur.Set(false);
        }
        //ジョイスティック入力:右
        else if (!mainCameraObj.isRotation && !KeyLoader.keyLoader.StickWait && KeyLoader.keyLoader.joyStickAxis.x > 0)
        {
            if (stage == Menu.GOD)
            {
                stage = Menu.MONSTER;
            }
            else
            {
                stage++;
            }

            SEMaster.Play(stageSelectSE);
            StartCoroutine(mainCameraObj.Right(stage));
            StartCoroutine(stNameObj.TargetFrameMoveRightReset(CAMERA_ROTATION_TIME));
            KeyLoader.keyLoader.SetStickWait(RESET_STAGE_FRAME);
        }
        //ジョイスティック入力:左
        else if (!mainCameraObj.isRotation && !KeyLoader.keyLoader.StickWait && KeyLoader.keyLoader.joyStickAxis.x < 0)
        {
            if (stage == Menu.MONSTER)
            {
                stage = Menu.GOD;
            }
            else
            {
                stage--;
            }
            SEMaster.Play(stageSelectSE);
            StartCoroutine(mainCameraObj.Left(stage));
            StartCoroutine(stNameObj.TargetFrameMoveLeftReset(CAMERA_ROTATION_TIME));
            KeyLoader.keyLoader.SetStickWait(RESET_STAGE_FRAME);
        }
    }