Ejemplo n.º 1
0
 //caso seja detectado um colisor passando pela área (trigger) e ele for o "Finish"
 //então o status atual é salvo com o personagem "vivo" e a cena irá mudar para a tela de vitória
 void OnTriggerEnter2D(Collider2D coll)
 {
     if (coll.gameObject.CompareTag("Finish"))
     {
         SaveStatus(true);
         fade.ChangeScene("TIE_Win");
     }
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (Fade.FadeEnd())
        {
            if ((Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0)))
            {
                BGMManager.Instance.PlaySE("Cursor_Decision");
                switch (menu.SelectNow)
                {
                case 0:
                {
                    Fade.ChangeScene("Select");
                    break;
                }

                case 1:
                {
                    Fade.ChangeScene("PlayRecordScene");
                    break;
                }

                case 2:
                {
                    Fade.ChangeScene("Ranking");
                    break;
                }

                case 3:
                {
                    //kure
                    Fade.ChangeScene("Credit");
                    break;
                }

                case 4:
                {
                    //asobikata
                    Fade.ChangeScene("Asobikata");
                    break;
                }

                default:
                {
                    break;
                }
                }
            }
        }

        if (Input.GetKeyDown(KeyCode.Escape) && Fade.FadeEnd())
        {
            BGMManager.Instance.PlaySE("Cursor_Cancel");
            Fade.ChangeScene("sekTitle");
        }
    }
Ejemplo n.º 3
0
    private IEnumerator GameEnd()
    {
        camera_.target_ = transform;
        light_.gameObject.SetActive(true);

        yield return(new WaitForSeconds(5));

        Cursor.visible = true;
        EndGame.score_ = WaveSpawner.waveCounter_;
        fade_.ChangeScene(2);
    }
Ejemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        m_time += Time.deltaTime;

        switch (m_state)
        {
        case State.CountDown:
        {
            if (m_countdownImage.enabled == false)
            {
                m_countdownImage.enabled = true;
            }
            m_countdownImage.sprite = m_countdownSprites[(int)(m_countDownTime - m_time)];
            m_countdownImage.color  = new Color(1f, 0, 0, (1f - (m_time - Mathf.FloorToInt(m_time))));
            if (m_countDownTime < m_time)
            {
                m_countdownImage.enabled = false;
                m_state = State.Ribbon;
                m_time  = 0.0f;
                BGMManager.instance.PlaySE("se032_GameOverRibbon");
            }
            break;
        }

        case State.Ribbon:
        {
            if (m_startTime < m_time)
            {
                for (int i = 0; i < m_sprites.Length; ++i)
                {
                    m_sprites[i].fillAmount     = (m_time - m_startTime) / (m_lerpTime);
                    m_textSprites[i].fillAmount = (m_time - m_startTime) / (m_lerpTime);
                }
            }
            if (m_endTime < m_time)
            {
                m_state = State.End;
            }
            break;
        }

        case State.End:
        {
            Fade.ChangeScene("Result");
            m_state = State.None;
            break;
        }

        default:
            m_countdownImage.enabled = false;
            break;
        }
    }
Ejemplo n.º 5
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Fade.ChangeScene("Menu");

            if (BGMManager.Instance != null)
            {
                BGMManager.Instance.PlaySE("Cursor_Cancel");
            }
        }
    }
Ejemplo n.º 6
0
 // Update is called once per frame
 void Update()
 {
     //シーン移動カウント
     if (effectStartFlg == true)
     {
         //タイマー加算
         sceneTimer += Time.deltaTime;
         if (sceneTimer > 2.0f)
         {
             //リザルトシーンへ移動する。(フェードアウト起動?)
             Fade.ChangeScene("ResultScene");
         }
     }
 }
Ejemplo n.º 7
0
    // Update is called once per frame
    void Update()
    {
        //戻るボタン
        if (Input.GetKeyDown(KeyCode.Escape) && Fade.FadeEnd())
        {
            //SE再生
            if (BGMManager.Instance != null)
            {
                BGMManager.Instance.PlaySE("Cursor_Cancel");
            }

            //シーン遷移開始
            Fade.ChangeScene("Menu");
        }
    }
Ejemplo n.º 8
0
    // Update is called once per frame
    void Update()
    {
        XInputDotNetPure.GamePadState pad1 = GamePad.GetState(PlayerIndex.One);
        XInputDotNetPure.GamePadState pad2 = GamePad.GetState(PlayerIndex.Two);
        XInputDotNetPure.GamePadState pad3 = GamePad.GetState(PlayerIndex.Three);
        XInputDotNetPure.GamePadState pad4 = GamePad.GetState(PlayerIndex.Four);

        // スタートが押されたら遷移
        if ((pad1.Buttons.Start == ButtonState.Pressed) ||
            (pad2.Buttons.Start == ButtonState.Pressed) ||
            (pad3.Buttons.Start == ButtonState.Pressed) ||
            (pad4.Buttons.Start == ButtonState.Pressed) ||
            (Input.GetKeyDown(KeyCode.A)))
        {
            Fade.ChangeScene("Title");
        }
    }
Ejemplo n.º 9
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape) || m_camera.isEnd)
     {
         m_camera.isEnd = true;
         Time.timeScale = 1.0f;
         Fade.ChangeScene("Menu");
     }
     else
     {
         if (Input.GetKey(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKey(KeyCode.KeypadEnter) || Input.GetKey(KeyCode.Joystick1Button0))
         {
             Time.timeScale = 3.0f;
         }
         else
         {
             Time.timeScale = 1.0f;
         }
     }
 }
Ejemplo n.º 10
0
    void Update()
    {
        if ((Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0)) && quit_ques == false)
        {
            //Fade  fade = GameObject.Find("Fade").GetComponent<Fade>();
            //fade.ChangeScene("menu");
            BGMManager.Instance.PlaySE("Title_Start");
            Fade.ChangeScene("Menu");
        }
        // デバッグ
        // DebugInput();

        if (timer > ButtonWaitTime)
        {
            UpdateInput();

            JumpScene();
        }
        else
        {
            timer += Time.deltaTime;
        }

        //// セーブリセット
        //if (Input.GetKey(KeyCode.F12))
        //{
        //    m_triggerTime -= Time.deltaTime;
        //}
        //else
        //{
        //    m_triggerTime = 10;
        //}
        //if (m_triggerTime <= 0)
        //{
        //    SaveDataManager manager = GameObject.Find("SaveDataManager").GetComponent<SaveDataManager>();
        //    manager.Reset();
        //    Debug.Log("Save data reset!");
        //}
        //
    }
Ejemplo n.º 11
0
 void Update()
 {
     if (Input.GetKeyDown("down") && index == 0)
     {
         index++;
         arrowPosition            = new Vector3(quit.transform.position.x, quit.transform.position.y - 25, 0);
         arrow.transform.position = arrowPosition;
     }
     if (Input.GetKeyDown("up") && index == 1)
     {
         index--;
         arrowPosition            = new Vector3(restart.transform.position.x, restart.transform.position.y - 25, 0);
         arrow.transform.position = arrowPosition;
     }
     if (Input.GetKeyDown("return") && index == 0)
     {
         fade.ChangeScene("level1");
     }
     if (Input.GetKeyDown("return") && index == 1)
     {
         Application.Quit();
     }
 }
Ejemplo n.º 12
0
    /// <summary>
    /// キーの入力待ち状態
    /// </summary>
    private void _WaitKey()
    {
        XInputDotNetPure.GamePadState pad1 = GamePad.GetState(PlayerIndex.One);
        XInputDotNetPure.GamePadState pad2 = GamePad.GetState(PlayerIndex.Two);
        XInputDotNetPure.GamePadState pad3 = GamePad.GetState(PlayerIndex.Three);
        XInputDotNetPure.GamePadState pad4 = GamePad.GetState(PlayerIndex.Four);

        m_intervalTime += Time.deltaTime;

        if (Input.GetKeyDown(KeyCode.A))
        {
            Fade.ChangeScene("Ending");
        }

        if ((pad1.Buttons.Start == ButtonState.Pressed) ||
            (pad2.Buttons.Start == ButtonState.Pressed) ||
            (pad3.Buttons.Start == ButtonState.Pressed) ||
            (pad4.Buttons.Start == ButtonState.Pressed) ||
            (m_intervalTime >= 3.0f))
        {
            Fade.ChangeScene("Ending");
        }
    }
Ejemplo n.º 13
0
    // Update is called once per frame
    void Update()
    {
        XInputDotNetPure.GamePadState pad1 = GamePad.GetState(PlayerIndex.One);
        XInputDotNetPure.GamePadState pad2 = GamePad.GetState(PlayerIndex.Two);
        XInputDotNetPure.GamePadState pad3 = GamePad.GetState(PlayerIndex.Three);
        XInputDotNetPure.GamePadState pad4 = GamePad.GetState(PlayerIndex.Four);


        // BGM鳴らす
        if (!bgm004_startFlag)
        {
            //BGMManager.instance.PlayBGM("bgm004_GameSelect", 1.0f);
            bgm004_startFlag = true;
        }

        /*
         * for (int i = 0; i < ConstPlayerMax; i++)
         * {
         *
         *  if(MultiInput.GetButtonDown("Pause", m_joypadNumber[i]))
         *  {
         *      m_readyFlag[i] = true;
         *      readyText[i].text = "OK!";
         *  }
         * }
         */

        //if (Input.GetKeyDown(KeyCode.Z) || MultiInput.GetButtonDown("Pause",MultiInput.JoypadNumber.Pad1))
        if ((pad1.Buttons.Start == ButtonState.Pressed) || Input.GetKeyDown(KeyCode.Z))
        {
            m_readyFlag[0]    = true;
            readyText[0].text = "OK!";

            GameObject.Find("PlayerCharacter1").GetComponent <Animator>().SetBool("isGlad", true);
        }


        if ((pad2.Buttons.Start == ButtonState.Pressed) || Input.GetKeyDown(KeyCode.X))
        {
            m_readyFlag[1]    = true;
            readyText[1].text = "OK!";

            GameObject.Find("PlayerCharacter2").GetComponent <Animator>().SetBool("isGlad", true);
        }

        if ((pad3.Buttons.Start == ButtonState.Pressed) || Input.GetKeyDown(KeyCode.C))
        {
            m_readyFlag[2]    = true;
            readyText[2].text = "OK!";

            GameObject.Find("PlayerCharacter3").GetComponent <Animator>().SetBool("isGlad", true);
        }

        if ((pad4.Buttons.Start == ButtonState.Pressed) || Input.GetKeyDown(KeyCode.V))
        {
            m_readyFlag[3]    = true;
            readyText[3].text = "OK!";

            GameObject.Find("PlayerCharacter4").GetComponent <Animator>().SetBool("isGlad", true);
        }



        // 全員分
        for (int i = 0; i < ConstPlayerMax; i++)
        {
            // レディーが押されていたら
            if (m_readyFlag[i])
            {
                // SE鳴らす
                if (!se026_startFlag[i])
                {
                    BGMManager.instance.PlaySE("se026_PlayerPrepareFinish");
                    se026_startFlag[i] = true;
                }

                // だんだん大きくする
                readyText[i].transform.localScale += new Vector3(0.2f, 0.2f, 0.2f);
                if (readyText[i].transform.localScale.x > 1.0f)
                {
                    readyText[i].transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
                }
            }
        }


        // シーン遷移
        if (m_readyFlag[0] && m_readyFlag[1] && m_readyFlag[2] && m_readyFlag[3])
        {
            // 文字を点滅させる
            //GameObject.Find("InfoText").GetComponent<InfoText>().FlashText();
            GameObject.Find("InfoText").GetComponent <FlashText>().DecideText();

            // 時間経過
            m_time += Time.deltaTime;

            // 1秒たったら遷移
            if (m_time > 1.0f)
            {
                BGMManager.instance.StopBGM(0.0f);
                Fade.ChangeScene("Tutorial");
            }
        }
    }
Ejemplo n.º 14
0
    ///
    /// <summary>   ステートを更新.    </summary>
    ///
    /// <remarks>   Kazuyuki,.  </remarks>
    ///

    protected void UpdateState()
    {
        switch (m_mainState)
        {
        case MainState.START:

            // ヘルプ(F12)押したらポーズに遷移
            if (Input.GetKeyDown(KeyCode.F12) && Fade.FadeEnd())
            {
                BGMManager.Instance.PlaySE("Game_Pause");
                ExecuteStateExitProcesss(m_mainState);
                if (m_modeState == ModeState.NORMAL_PLAY)
                {
                    m_beforeMainStete           = m_mainState;
                    m_beforeEnterPauseMainStete = m_mainState;
                    m_mainState = MainState.PAUSE;
                }
                else
                {
                    m_beforeMainStete           = m_mainState;
                    m_beforeEnterPauseMainStete = m_mainState;
                    m_mainState = MainState.CHECK_TRANSITION;
                }
                ExecuteStateEnterProcesss(m_mainState);
            }
            // 決定キー押されたらプレイ状態
            if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))
            {
                ExecuteStateExitProcesss(m_mainState);
                m_beforeMainStete = m_mainState;
                m_mainState       = MainState.PLAY;
                ExecuteStateEnterProcesss(m_mainState);
                BGMManager.Instance.PlaySE("Game_Start");
            }
            break;

        case MainState.PLAY:

            // ヘルプ(F12)押したらポーズに遷移
            if (Input.GetKeyDown(KeyCode.F12))
            {
                ExecuteStateExitProcesss(m_mainState);
                if (m_modeState == ModeState.NORMAL_PLAY)
                {
                    m_beforeMainStete           = m_mainState;
                    m_beforeEnterPauseMainStete = m_mainState;
                    m_mainState = MainState.PAUSE;
                }
                else
                {
                    m_beforeMainStete           = m_mainState;
                    m_beforeEnterPauseMainStete = m_mainState;
                    m_mainState = MainState.CHECK_TRANSITION;
                }
                ExecuteStateEnterProcesss(m_mainState);
                BGMManager.Instance.PlaySE("Game_Pause");
            }
            // プレイヤーが死んだらエンド状態
            else if (player.GetComponent <PlayerCharacterController>().size <= 0.0f)
            {
                ExecuteStateExitProcesss(m_mainState);
                m_beforeMainStete = m_mainState;
                m_mainState       = MainState.END;
                ExecuteStateEnterProcesss(m_mainState);
                BGMManager.Instance.PlaySE("Game_Set");
            }
            break;

        case MainState.PAUSE:
            if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))
            {
                if (m_selectIconInPause == SelectMainPauseScene.SELECT_BACK)
                {
                    ExecuteStateExitProcesss(m_mainState);
                    MainState temp = m_beforeEnterPauseMainStete;                            //前の状態に戻る
                    m_beforeMainStete = m_mainState;
                    m_mainState       = temp;
                    ExecuteStateEnterProcesss(m_mainState);
                    BGMManager.Instance.PlaySE("Cursor_Cancel");
                }
                else if (m_selectIconInPause == SelectMainPauseScene.SELECT_TRANSITION_MENU)
                {
                    ExecuteStateExitProcesss(m_mainState);
                    m_beforeMainStete = m_mainState;
                    m_mainState       = MainState.CHECK_TRANSITION;
                    ExecuteStateEnterProcesss(m_mainState);
                    BGMManager.Instance.PlaySE("Cursor_Decision");
                }
                else if (m_selectIconInPause == SelectMainPauseScene.SELECT_PLAY_RECORD)
                {
                    ExecuteStateExitProcesss(m_mainState);
                    m_beforeMainStete = m_mainState;
                    m_mainState       = MainState.PLAY_RECORD;
                    ExecuteStateEnterProcesss(m_mainState);
                    BGMManager.Instance.PlaySE("Cursor_Decision");
                }
            }
            break;

        case MainState.CHECK_TRANSITION:

            if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))
            {
                if (m_selectIconInTransitionMenu == SelectMainTransitionMenu.SELECT_NO)
                {
                    BGMManager.Instance.PlaySE("Cursor_Cancel");
                    ExecuteStateExitProcesss(m_mainState);
                    m_beforeMainStete = m_mainState;
                    m_mainState       = MainState.PAUSE;
                    if (m_modeState == ModeState.FREE_PLAY)
                    {
                        MainState temp = m_beforeEnterPauseMainStete;                                //前の状態に戻る
                        m_beforeMainStete = m_mainState;
                        m_mainState       = temp;
                    }
                    ExecuteStateEnterProcesss(m_mainState);
                }
                if (m_selectIconInTransitionMenu == SelectMainTransitionMenu.SELECT_YES)
                {
                    BGMManager.Instance.PlaySE("Cursor_Decision");
                    Fade.ChangeScene("Menu");
                }
            }
            break;

        case MainState.PLAY_RECORD:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                BGMManager.Instance.PlaySE("Cursor_Cancel");
                ExecuteStateExitProcesss(m_mainState);
                m_beforeMainStete = m_mainState;
                m_mainState       = MainState.PAUSE;
                ExecuteStateEnterProcesss(m_mainState);
            }
            break;

        case MainState.END:

            break;

        default:
            break;
        }
    }
Ejemplo n.º 15
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            SetData();
            Fade.ChangeScene("Result");
        }

        for (int i = 0; i < 4; ++i)
        {
            m_padState[i] = GamePad.GetState(PlayerIndex.One + i);
            if (m_padState[i].Buttons.Start == ButtonState.Pressed)
            {
                m_key_HoldTime[i] += Time.deltaTime;
                if (Fade.instance.FadeEnd() && m_key_HoldTime[i] > m_keyHoldLimit)
                {
                    SetData();
                    Fade.ChangeScene("Title");
                }
            }
            else
            {
                m_key_HoldTime[i] = 0.0f;
            }
        }

        // 時間を測る
        if (isStart)
        {
            nowTime += Time.deltaTime;
        }
        // 残り時間を計算
        float dispTime = timeInit - nowTime;

        int second = (int)dispTime % 60; // 秒を計算
        int minute = (int)dispTime / 60; // 分を計算

        timeText.text = minute.ToString() + ":" + second.ToString().PadLeft(2, '0');

        if (dispTime <= m_feverStartTime + 1.0f && !m_isFever)
        {
            m_isFever = true;
            m_fever.StartFever();
        }

        if (dispTime <= m_countDownStartTime + 1 && !m_isCountDown)
        {
            m_isCountDown = true;
            m_endEffect.StartEndEffect();
            m_clock.enabled = false;
            m_timeNiddle.SetActive(false);
        }
        else if (m_isCountDown)
        {
            timeText.text = "";
        }

        if (dispTime <= 0 && isStart)
        {
            isStart = false;
            SetData();
        }
    }
Ejemplo n.º 16
0
    // Update is called once per frame
    void Update()
    {
        if (((Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))) && Fade.FadeEnd())
        {
            switch (state)
            {
            case Charselect.SELECT:
            {
                //回転が終わっているかキャラが解放されているかチェック
                if (CheckOpenChar(soap.GetCharNo()) && soap.EndRotation())
                {
                    state = Charselect.PLAY;
                    //キャラセレクトからモードセレクトへ移行準備
                    soap.SetEnter();
                    no.SetCharNo(soap.GetCharNo());
                    //表示切替
                    charUI.ChangePause();
                    BGMManager.Instance.PlaySE("Character_Decision");
                    selifu[0].Sleep();
                    selifu[1].Sleep();
                }
                else
                {
                    BGMManager.Instance.PlaySE("Not_Character_Decision");
                    if (soap.EndRotation())
                    {
                        switch (soap.GetCharNo())
                        {
                        case 1:
                            selifu[0].Active();
                            selifu[1].Sleep();
                            break;

                        case 2:
                            selifu[1].Active();
                            selifu[0].Sleep();
                            break;

                        default:
                            break;
                        }
                    }
                }
                break;
            }

            case Charselect.PLAY:
            {
//                        Application.LoadLevel("Main");
                state = Charselect.FADE;
                BGMManager.Instance.PlaySE("Cursor_Decision");
                Fade.ChangeScene("main");
                //プレイモードセット
                SceneData.modeSelect = (PlayModeState)m_playMode.SelectNow;

                break;
            }

            default:
            {
                break;
            }
            }
        }
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            switch (state)
            {
            case Charselect.SELECT:
            {
                Fade.ChangeScene("Menu");
                break;
            }

            case Charselect.PLAY:
            {
                state = Charselect.SELECT;
                charUI.ChangePause();
                break;
            }
            }
        }

        if (state == Charselect.PLAY)
        {
            //1f対応
            if (!CheckOpenChar(soap.GetCharNo()))
            {
                state = Charselect.SELECT;
                charUI.ChangePause();
            }
        }

        switch (soap.GetCharNo())
        {
        case 0:
            name.text   = "せっけんくん";
            status.text = "せっけんくんは\nのうりょくが\nへいきんてきな\nキャラクターだ";
            name.color  = status.color = new Color(0.0f, 0.8f, 1.0f);
            selifu[0].Sleep();
            selifu[1].Sleep();
            break;

        case 1:
            if (soaps[0].active)
            {
                name.text   = "せっけんヒーロー";
                status.text = "せっけんヒーローはスピードが\nはやいので\nテクニックがひつようだ!";

                name.color = status.color = new Color(1.0f, 0.6f, 0.0f);
            }
            else
            {
                name.text = status.text = "";
            }
            break;

        case 2:
            if (soaps[2].active)
            {
                name.text   = "せっけんちゃん";
                status.text = "せっけんちゃんは\nかいふくりょくがたかいが\nうけるダメージがおおきいぞ";
                name.color  = status.color = new Color(1.0f, 0.0f, 0.4f);
            }
            else
            {
                name.text = status.text = "";
            }
            break;

        default:
            break;
        }
    }
Ejemplo n.º 17
0
 //este metodo recebe uma string com o nome da próxima cena e já muda
 public void ChangeScene(string scene)
 {
     fade.ChangeScene(scene);
     //não tem o FadeOutChangeScene = true;
 }
Ejemplo n.º 18
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.F12))
        {
            switch (state)
            {
            case MainPoseState.NONE:
            {
                state = MainPoseState.POSE;
                ui.ChangePause();
                break;
            }

            default:
            {
                //state = MainPoseState.NONE;
                //ui.ChangePause();
                break;
            }
            }
        }
        if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))
        {
            switch (state)
            {
            case MainPoseState.POSE:
            {
                switch (menu.SelectNow)
                {
                case 0:
                {
                    state = MainPoseState.NONE;
                    ui.ChangePause();
                    break;
                }

                case 1:
                {
                    state = MainPoseState.MENU;
                    mode.ChangePauseMenu((int)MainPoseState.MENU);
                    break;
                }

                case 2:
                {
                    state = MainPoseState.PLAY_RECORD;
                    mode.ChangePauseMenu((int)MainPoseState.PLAY_RECORD);
                    break;
                }
                }
                break;
            }

            case MainPoseState.MENU:
            {
                switch (Ref.SelectNow)
                {
                case 0:
                {
                    Fade.ChangeScene("Menu");
                    break;
                }

                case 1:
                {
                    state = MainPoseState.POSE;
                    mode.ChangePauseMenu((int)MainPoseState.POSE);
                    break;
                }
                }
                break;
            }

            case MainPoseState.PLAY_RECORD:
            {
                break;
            }
            }
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            switch (state)
            {
            case MainPoseState.POSE:
            {
                state = MainPoseState.NONE;
                ui.ChangePause();
                break;
            }

            case MainPoseState.MENU:
            {
                state = MainPoseState.POSE;
                mode.ChangePauseMenu((int)MainPoseState.POSE);
                break;
            }

            case MainPoseState.PLAY_RECORD:
            {
                state = MainPoseState.POSE;
                mode.ChangePauseMenu((int)MainPoseState.POSE);
                break;
            }

            default:
            {
                break;
            }
            }
        }
    }
Ejemplo n.º 19
0
    // Update is called once per frame
    void Update()
    {
        XInputDotNetPure.GamePadState pad1 = GamePad.GetState(PlayerIndex.One);
        XInputDotNetPure.GamePadState pad2 = GamePad.GetState(PlayerIndex.Two);
        XInputDotNetPure.GamePadState pad3 = GamePad.GetState(PlayerIndex.Three);
        XInputDotNetPure.GamePadState pad4 = GamePad.GetState(PlayerIndex.Four);

        switch (m_titlestate)
        {
        case TitleState.Start:      //タイトル開始時
            m_titlestate = TitleState.Ribbon;
            BGMManager.instance.StopBGM(0.0f);
            break;

        case TitleState.Ribbon:     //リボンを投げる
            m_ribbon.ThrowRibbon();

            // 投げるSE鳴らすse001_ThrowJustRibbon
            if (!se001_startFlag)
            {
                BGMManager.instance.PlaySE("se001_ThrowJustRibbon");
                se001_startFlag = true;
            }

            if (m_ribbon.ThrowFinishFlag)       //リボンが所定の位置に着いたら遷移を移動させる
            {
                m_ribbon.ResetBezierRibbon();
                m_titlePlayerAnimator.SetBool("Running", true);
                m_girl.RotationGirl();
                m_titlestate = TitleState.TrailTitleLogo;
            }
            break;

        case TitleState.TrailTitleLogo:     //リボンを引きずる・女性を移動させる・タイトルロゴを引きずる
            //所定の位置に着いたら遷移を移動させる
            if (m_ribbon.TrailFinishFlag && m_titlelogo.TrailtitleLogoFinishFlag)
            {
                //m_invisibleribbon.ActiveRibbon(false);
                m_ribbon.gameObject.SetActive(false);
                m_titlestate = TitleState.BoundTitleLogo;
            }
            else
            {
                m_ribbon.TrailRibbon();
                m_girl.TrailGirl();
                m_titlelogo.TrailTitleLogo();
            }

            break;

        case TitleState.BoundTitleLogo:         //ロゴをバウンドさせる
            m_titlelogo.BoundTitleLogo();
            if (m_titlelogo.TitleLogoBoundFinishFlag &&
                m_titlelogo.TitleLogoTime() >= 5.0f)        //入力で次の遷移に
            {
                m_titleui.Activate(true);
                m_titlestate = TitleState.DisplaytitleLogo;
            }
            break;

        case TitleState.DisplaytitleLogo:       //UIを表示。
            m_titleui.ScaleTitleUI();

            // BGM鳴らす
            if (!bgm000_startFlag)
            {
                BGMManager.instance.PlayBGM("bgm000_Title", 0.1f);
                bgm000_startFlag = true;
            }

            if (Input.GetKeyDown(KeyCode.A) ||
                (pad1.Buttons.Start == ButtonState.Pressed) ||
                (pad2.Buttons.Start == ButtonState.Pressed) ||
                (pad3.Buttons.Start == ButtonState.Pressed) ||
                (pad1.Buttons.Start == ButtonState.Pressed))       //入力で次の遷移に。
            {
                m_titlestate = TitleState.Finish;
                m_titleui.Activate(false);
                Fade.ChangeScene("Opening");
                BGMManager.instance.StopBGM(0.8f);
                // 遷移SE鳴らす
                if (!se017_startFlag)
                {
                    BGMManager.instance.PlaySE("se017_DecideButton");
                    se017_startFlag = true;
                }
            }
            break;

        case TitleState.Finish:     //終了。ここで他の遷移に移動する
            Debug.Log("終了");
            //  BGMManager.instance.StopBGM(0.0f);

//                SceneManager.LoadScene("Select");
            break;
        }
    }
Ejemplo n.º 20
0
    // Update is called once per frame
    void Update()
    {
        //まだポイント表示がおわっていなければ何もしない。
        if (pointDrawEndFlg == false || inputEndFlg == true)
        {
            return;
        }

        //ランキング表示へ
        if (rankingDrawEndFlg == false)
        {
            if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))
            {
                rankingDrawEndFlg = true;
            }
            canvasRanking.gameObject.SetActive(true);
            return;
        }
        else
        {
            canvasRanking.gameObject.SetActive(false);
        }

        //ランクイン時なら名前入力へ
        if (rankingNameEndFlg == false)
        {
            //ランキングセット
            canvasRankingName.SetRank(rank);

            //有効化
            canvasRankingName.gameObject.SetActive(true);

            //名前選択処理
            if (canvasRankingName.Select() == true)
            {
                //名前選択終了処理
                canvasRankingName.gameObject.SetActive(false);
                rankingNameEndFlg = true;
            }
            return;
        }

        //実績が今回で解放されていれば表示へ
        bool _getRecordflg = false;

        for (int i = 0; i < 30; ++i)
        {
            if (recordGetFlg[i] == true)
            {
                //実績開放音を鳴らす
                if (recordGetBGMTrig[i] == true)
                {
                    recordGetBGMTrig[i] = false;
                    //SE
                    if (BGMManager.Instance != null)
                    {
                        BGMManager.Instance.PlaySE("Actual_Open");
                    }
                }

                _getRecordflg = true;
                canvasKaihou.gameObject.SetActive(true);
                canvasKaihou.SetRecordImage(i);
                if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))
                {
                    recordGetFlg[i] = false;
                }

                return;
            }
        }
        if (_getRecordflg == false)
        {
            canvasKaihou.gameObject.SetActive(false);
        }


        //入力を見てメニューへ
        //画面遷移表示
        if (sceneMoveDisplayFlg == true)
        {
            canvasSceneSelect.gameObject.SetActive(true);

            //画面を選択する
            if (Input.GetKeyDown(KeyCode.LeftArrow) && Fade.FadeEnd())
            {
                sceneMenuFlg = false;
                //SE
                if (BGMManager.Instance != null)
                {
                    BGMManager.Instance.PlaySE("Cursor_Move");
                }
            }
            if (Input.GetKeyDown(KeyCode.RightArrow) && Fade.FadeEnd())
            {
                sceneMenuFlg = true;
                //SE
                if (BGMManager.Instance != null)
                {
                    BGMManager.Instance.PlaySE("Cursor_Move");
                }
            }
            canvasSceneSelect.WakuSelect(sceneMenuFlg);

            //戻る
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                sceneMoveDisplayFlg = false;
                sceneMenuFlg        = false;
                canvasSceneSelect.gameObject.SetActive(false);
                //SE
                if (BGMManager.Instance != null)
                {
                    BGMManager.Instance.PlaySE("Cursor_Cancel");
                }

                return;
            }

            //画面遷移する。
            if (sceneMenuFlg == true)
            {
                if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))
                {
                    //SE
                    if (BGMManager.Instance != null)
                    {
                        BGMManager.Instance.PlaySE("Cursor_Decision");
                    }
                    selectingChara.loaded = true;   //引き継がない
                    Fade.ChangeScene("Menu");
                    inputEndFlg = true;
                }
            }
            else
            {
                if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))
                {
                    //SE
                    if (BGMManager.Instance != null)
                    {
                        BGMManager.Instance.PlaySE("Cursor_Decision");
                    }
                    //キャラクター情報を保持したまま今回の成績を削除
                    ActionRecordManager.sActionRecord.ResetCharaHozi();
                    Fade.ChangeScene("main");
                    inputEndFlg = true;
                }
            }
        }
        else
        {
            canvasSceneSelect.gameObject.SetActive(false);
            sceneMenuFlg = false;

            if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Joystick1Button0))
            {
                sceneMoveDisplayFlg = true;
                //SE
                if (BGMManager.Instance != null)
                {
                    BGMManager.Instance.PlaySE("Cursor_Decision");
                }
            }
        }
    }
Ejemplo n.º 21
0
    // Update is called once per frame
    void Update()
    {
        XInputDotNetPure.GamePadState pad1 = GamePad.GetState(PlayerIndex.One);
        XInputDotNetPure.GamePadState pad2 = GamePad.GetState(PlayerIndex.Two);
        XInputDotNetPure.GamePadState pad3 = GamePad.GetState(PlayerIndex.Three);
        XInputDotNetPure.GamePadState pad4 = GamePad.GetState(PlayerIndex.Four);

        // 時間経過開始
        if (!flg)
        {
            m_timeCountScript.StartTime();
            flg = true;
        }

        // スタートが押されたか
        //if (MultiInput.GetButtonDown("Pause", MultiInput.JoypadNumber.Pad1) || Input.GetKeyDown(KeyCode.Z))
        if ((pad1.Buttons.Start == ButtonState.Pressed) || Input.GetKeyDown(KeyCode.Z))
        {
            GameObject.Find("Ready1").GetComponent <Ready>().DispReady();
            m_readyFlag[0] = true;

            if (!se026_startFlag[0])
            {
                BGMManager.instance.PlaySE("se026_PlayerPrepareFinish");
                se026_startFlag[0] = true;
            }
        }

        if ((pad2.Buttons.Start == ButtonState.Pressed) || Input.GetKeyDown(KeyCode.X))
        {
            GameObject.Find("Ready2").GetComponent <Ready>().DispReady();
            m_readyFlag[1] = true;

            if (!se026_startFlag[1])
            {
                BGMManager.instance.PlaySE("se026_PlayerPrepareFinish");
                se026_startFlag[1] = true;
            }
        }

        if ((pad3.Buttons.Start == ButtonState.Pressed) || Input.GetKeyDown(KeyCode.C))
        {
            GameObject.Find("Ready3").GetComponent <Ready>().DispReady();
            m_readyFlag[2] = true;

            if (!se026_startFlag[2])
            {
                BGMManager.instance.PlaySE("se026_PlayerPrepareFinish");
                se026_startFlag[2] = true;
            }
        }

        if ((pad4.Buttons.Start == ButtonState.Pressed) || Input.GetKeyDown(KeyCode.V))
        {
            GameObject.Find("Ready4").GetComponent <Ready>().DispReady();
            m_readyFlag[3] = true;

            if (!se026_startFlag[3])
            {
                BGMManager.instance.PlaySE("se026_PlayerPrepareFinish");
                se026_startFlag[3] = true;
            }
        }


        // 全員レディしたら もしくは 残り時間が0になったら
        if ((m_readyFlag[0] && m_readyFlag[1] && m_readyFlag[2] && m_readyFlag[3]) || (m_timeCountScript.GetTime() <= 0.0f))
        {
            Fade.ChangeScene("Play");
        }
    }