Ejemplo n.º 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);
            }
        }
        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);
            }
        }