// 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;
    }
Ejemplo n.º 2
0
    private void InitStateMachine()
    {
        _stateMachine      = new StateMachine();
        StandingState      = new PlayerStandingState(this, _stateMachine);
        CrouchedState      = new PlayerCrouchedState(this, _stateMachine);
        JumpPreparingState = new PlayerJumpPrepState(this, _stateMachine);
        LeapOffState       = new PlayerLeapOffState(this, _stateMachine);
        FallingState       = new PlayerFallingState(this, _stateMachine);
        LandingState       = new PlayerLandingState(this, _stateMachine);
        PerformingState    = new PlayerPerformingState(this, _stateMachine);

        _stateMachine.Initialize(StandingState);
    }