Esempio n. 1
0
    /// <summary>
    /// フレーム更新処理
    /// </summary>
    void IState.Update()
    {
        // 手すりの上にいるかのチェック処理
        playerSlide.SlideCheck();

        // アクションボタンが押されたら
        if (character.IsSlideEnd == true)
        {
            // y方向への慣性制限
            playerSlide.LimitInertiaY();
            // 空中状態に移行
            character.RunStart();
        } // if(character.IsSlideEnd)

        // ジャンプボタンが押されたら
        if (character.IsJumpStart == true)
        {
            // y方向への慣性制限
            playerSlide.LimitInertiaY();
            // ジャンプ
            playerJump.Jump();
            // 空中状態に移行
            character.AerialStart();
        } // if(character.IsJumpStart)

        // 弾に当たったら
        if (playerAttack.IsHit == true)
        {
            // キャラの傾きを戻す
            transform.rotation = Quaternion.identity;
            // y方向への慣性制限
            playerSlide.LimitInertiaY();
            // ダウン状態に移行
            character.Down();
        }
        // ブーストのキー入力を確認
        playerCharge.BoostKeyCheck();
    } // Do