コード例 #1
0
    // Class Functions:
    protected override void InitializeStates()
    {
        #region Create States:
        #region Movement States:
        standingState       = new PlayerStandingState(this, stateMachine);
        combatIdleState     = new PlayerCombatIdleState(this, stateMachine);
        movingState         = new PlayerMovingState(this, stateMachine);
        jumpingState        = new PlayerJumpingState(this, stateMachine);
        fallingState        = new PlayerFallingState(this, stateMachine);
        crouchingState      = new PlayerCrouchingState(this, stateMachine);
        dashingState        = new PlayerDashingState(this, stateMachine);
        sprintingState      = new PlayerSprintingState(this, stateMachine);
        sprintRecoveryState = new PlayerSprintRecoveryState(this, stateMachine);
        slidingState        = new PlayerSlidingState(this, stateMachine);
        slidingJumpState    = new PlayerSlidingJumpState(this, stateMachine);
        standingGuardState  = new PlayerStandingGuardState(this, stateMachine);
        walkingState        = new PlayerWalkingState(this, stateMachine);
        crouchingGuardState = new PlayerCrouchingGuardState(this, stateMachine);
        #endregion // Movement States
        #region Action States:
        lightActionState  = new PlayerLightActionState(this, stateMachine);
        mediumActionState = new PlayerMediumActionState(this, stateMachine);
        heavyActionState  = new PlayerHeavyActionState(this, stateMachine);
        #endregion // Action States
        #region Reaction States:
        //burstState = new PlayerBurstState(this, stateMachine);
        //hitHighState = new PlayerHitHighState(this, stateMachine);
        //hitMedState = new PlayerHitMedState(this, stateMachine);
        //hitLowState = new PlayerHitLowState(this, stateMachine);
        //hitAirState = new PlayerHitAirState(this, stateMachine);
        //recoveryState = new PlayerRecoveryState(this, stateMachine);
        //knockbackState = new PlayerKnockbackState(this, stateMachine);
        //knockdownState = new PlayerKnockdownState(this, stateMachine);
        //deathState = new PlayerDeathState(this, stateMachine);
        #endregion // Reaction States
        #region Combat States:
        #region Unarmed States:
        #region Normals:
        #endregion // Normals
        #region Specials:
        //airAxeKick = new AirAxeKick(this, stateMachine);
        //airDragonPunch = new AirDragonPunch(this, stateMachine);
        feintRoll = new FeintRoll(this, stateMachine);
        //groundDragonPunch = new GroundDragonPunch(this, stateMachine);
        //hookKick = new HookKick(this, stateMachine);
        //lowKick = new LowKick(this, stateMachine);
        //rollingAxeKick = new RollingAxeKick(this, stateMachine);
        //snapKick = new SnapKick(this, stateMachine);
        //thrustKick = new ThrustKick(this, stateMachine);
        //verticalKick = new VerticalKick(this, stateMachine);
        #endregion // Specials
        #endregion // Unarmed States
        #endregion // Combat States
        #endregion // Create States

        // Initialize the starting states
        startState = standingState;
    }
コード例 #2
0
    private void PerformAction()
    {
        int test = FeintRoll.BufferInputIsCombo(playerController.playerInputData.comboBuffer);

        if (test == 1)
        {
            Debug.Log("right");
        }
        if (test == -1)
        {
            Debug.Log("left");
        }
    }