private void Awake() { stateMachine = new PlayerStateMachine(); idleState = new PlayerIdleState(this, stateMachine, playerData, "Idle"); moveState = new PlayerMoveState(this, stateMachine, playerData, "Move"); jumpState = new PlayerJumpState(this, stateMachine, playerData, "InAir"); inAirState = new PlayerInAirState(this, stateMachine, playerData, "InAir"); landState = new PlayerLandState(this, stateMachine, playerData, "Land"); dashState = new PlayerDashState(this, stateMachine, playerData, "InAir"); crouchIdleState = new PlayerCrouchIdleState(this, stateMachine, playerData, "IdleCrouch"); crouchMoveState = new PlayerCrouchState(this, stateMachine, playerData, "MoveCrouch"); primAtkState = new PlayerPrimAtkState(this, stateMachine, playerData, "PrimAttack"); }
private void Awake() { FiniteStateMachine = new PlayerFiniteStateMachine(); SkillManager = new PlayerSkillsManager(); StatsManager = new PlayerStatsManager(_playerStatsData); IdleState = new PlayerIdleState(this, FiniteStateMachine, "idle", _idleStateData); MoveState = new PlayerMoveState(this, FiniteStateMachine, "move", _moveStateData); LandState = new PlayerLandState(this, FiniteStateMachine, "land"); JumpState = new PlayerJumpState(this, FiniteStateMachine, "inAir", _jumpStateData); InAirState = new PlayerInAirState(this, FiniteStateMachine, "inAir", _inAirStateData); WallSlideState = new PlayerWallSlideState(this, FiniteStateMachine, "wallSlide", _wallSlideStateData); WallGrabState = new PlayerWallGrabState(this, FiniteStateMachine, "wallGrab"); WallClimbState = new PlayerWallClimbState(this, FiniteStateMachine, "wallClimb", _wallClimbStateData); WallJumpState = new PlayerWallJumpState(this, FiniteStateMachine, "inAir", _wallJumpStateData); LedgeClimbState = new PlayerLedgeClimbState(this, FiniteStateMachine, "ledgeClimbState", _ledgeClimbStateData); DashState = new PlayerDashState(this, FiniteStateMachine, "inAir", _dashStateData); RollState = new PlayerRollState(this, FiniteStateMachine, "rollState", _rollStateData); CrouchIdleState = new PlayerCrouchIdleState(this, FiniteStateMachine, "crouchIdle", _crouchIdleStateData); CrouchMoveState = new PlayerCrouchMoveState(this, FiniteStateMachine, "crouchMove", _crouchMoveStateData); OnRopeStateAim = new PlayerOnRopeState_Aim(this, FiniteStateMachine, "idle", _onRopeStateData); OnRopeStateAttach = new PlayerOnRopeState_Attach(this, FiniteStateMachine, "inAir", _onRopeStateData); OnRopeStateMove = new PlayerOnRopeState_Move(this, FiniteStateMachine, "inAir", _onRopeStateData); OnRopeStateFinish = new PlayerOnRopeState_Finish(this, FiniteStateMachine, "inAir", _onRopeStateData); SwordAttackState01 = new PlayerSwordAttackState_01(this, FiniteStateMachine, "swordAttack01", _swordAttackPosition01, _swordAttackStateData01); SwordAttackState02 = new PlayerSwordAttackState_02(this, FiniteStateMachine, "swordAttack02", _swordAttackPosition02, _swordAttackStateData02); SwordAttackState03 = new PlayerSwordAttackState_03(this, FiniteStateMachine, "swordAttack03", _swordAttackPosition03, _swordAttackStateData03); FireArrowShotStateStart = new PlayerBowFireArrowShotState_Start(this, FiniteStateMachine, "bowFireShotStart", _fireArrowShotAttackPosition, _fireArrowShotStateData); FireArrowShotStateAim = new PlayerBowFireArrowShotState_Aim(this, FiniteStateMachine, "bowFireShotAim", _fireArrowShotAttackPosition, _fireArrowShotStateData); FireArrowShotStateFinish = new PlayerBowFireArrowShotState_Finish(this, FiniteStateMachine, "bowFireShotFinish", _fireArrowShotAttackPosition, _fireArrowShotStateData); StunState = new PlayerStunState(this, FiniteStateMachine, "stun", StunStateData); DeadState = new PlayerDeadState(this, FiniteStateMachine, "dead", _deadStateData); }
private void Awake() { StateMachine = new PlayerStateMachine(); IdleState = new PlayerIdleState(this, StateMachine, playerData, "idle"); MoveState = new PlayerMoveState(this, StateMachine, playerData, "move"); JumpState = new PlayerJumpState(this, StateMachine, playerData, "inAir"); InAirState = new PlayerInAirState(this, StateMachine, playerData, "inAir"); LandState = new PlayerLandState(this, StateMachine, playerData, "land"); WallSlideState = new PlayerWallSlideState(this, StateMachine, playerData, "wallSlide"); WallGrabState = new PlayerWallGrabState(this, StateMachine, playerData, "wallGrab"); WallClimbState = new PlayerWallClimbState(this, StateMachine, playerData, "wallClimb"); WallJumpState = new PlayerWallJumpState(this, StateMachine, playerData, "inAir"); LedgeClimbState = new PlayerLedgeClimbState(this, StateMachine, playerData, "ledgeClimbState"); DashState = new PlayerDashState(this, StateMachine, playerData, "inAir"); CrouchIdleState = new PlayerCrouchIdleState(this, StateMachine, playerData, "crouchIdle"); CrouchMoveState = new PlayerCrouchMoveState(this, StateMachine, playerData, "crouchMove"); }
private void Awake() { FiniteStateMachine = new PlayerFiniteStateMachine(); IdleState = new PlayerIdleState(this, FiniteStateMachine, _playerData, "idle"); MoveState = new PlayerMoveState(this, FiniteStateMachine, _playerData, "move"); LandState = new PlayerLandState(this, FiniteStateMachine, _playerData, "land"); JumpState = new PlayerJumpState(this, FiniteStateMachine, _playerData, "inAir"); InAirState = new PlayerInAirState(this, FiniteStateMachine, _playerData, "inAir"); WallSlideState = new PlayerWallSlideState(this, FiniteStateMachine, _playerData, "wallSlide"); WallGrabState = new PlayerWallGrabState(this, FiniteStateMachine, _playerData, "wallGrab"); WallClimbState = new PlayerWallClimbState(this, FiniteStateMachine, _playerData, "wallClimb"); WallJumpState = new PlayerWallJumpState(this, FiniteStateMachine, _playerData, "inAir"); LedgeClimbState = new PlayerLedgeClimbState(this, FiniteStateMachine, _playerData, "ledgeClimbState"); DashState = new PlayerDashState(this, FiniteStateMachine, _playerData, "inAir"); CrouchIdleState = new PlayerCrouchIdleState(this, FiniteStateMachine, _playerData, "crouchIdle"); CrouchMoveState = new PlayerCrouchMoveState(this, FiniteStateMachine, _playerData, "crouchMove"); OnRopeStateAim = new PlayerOnRopeState_Aim(this, FiniteStateMachine, _playerData, "idle"); OnRopeStateAttach = new PlayerOnRopeState_Attach(this, FiniteStateMachine, _playerData, "inAir"); OnRopeStateMove = new PlayerOnRopeState_Move(this, FiniteStateMachine, _playerData, "inAir"); OnRopeStateFinish = new PlayerOnRopeState_Finish(this, FiniteStateMachine, _playerData, "inAir"); // TODO: Attack states using unnecessary Player Data SwordAttackState01 = new PlayerSwordAttackState_01(this, FiniteStateMachine, _playerData, "swordAttack01", _swordAttackPosition01, _playerSwordAttackData01); SwordAttackState02 = new PlayerSwordAttackState_02(this, FiniteStateMachine, _playerData, "swordAttack02", _swordAttackPosition02, _playerSwordAttackData02); SwordAttackState03 = new PlayerSwordAttackState_03(this, FiniteStateMachine, _playerData, "swordAttack03", _swordAttackPosition03, _playerSwordAttackData03); FireArrowShotStateStart = new PlayerBowFireArrowShotState_Start(this, FiniteStateMachine, _playerData, "bowFireShotStart", _fireArrowShotAttackPosition, _playerFireArrowShotData); FireArrowShotStateAim = new PlayerBowFireArrowShotState_Aim(this, FiniteStateMachine, _playerData, "bowFireShotAim", _fireArrowShotAttackPosition, _playerFireArrowShotData); FireArrowShotStateFinish = new PlayerBowFireArrowShotState_Finish(this, FiniteStateMachine, _playerData, "bowFireShotFinish", _fireArrowShotAttackPosition, _playerFireArrowShotData); }
private void Awake() { _stateMachine = new PlayerStateMachine(); CombatController = new CombatController(); IdleState = new PlayerIdleState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_IDLE_2_HASH); MoveState = new PlayerMoveState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_RUN_2_HASH); JumpState = new PlayerJumpState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_JUMP_HASH); InAirState = new PlayerInAirState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_AIR_HASH); LandState = new PlayerLandState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_LAND_HASH); WallSlideState = new PlayerWallSlideState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_WALL_SLIDING_HASH); LedgeClimbState = new PlayerLedgeClimbState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_LEDGE_GRAB_HASH); LedgeJumpState = new PlayerLedgeJumpState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_LEDGE_JUMP_HASH); CrouchIdleState = new PlayerCrouchIdleState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_CROUCH_IDLE_HASH); CrouchMoveState = new PlayerCrouchMoveState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_CROUCH_WALK_HASH); SwordAttackState = new PlayerSwordAttackState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_ATTACK_1_HASH, 3); HandAttackState = new PlayerHandAttackState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_PUNCH_1_HASH, 5); AirAttackState = new PlayerAirAttackState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_AIR_ATTACK_1_HASH, 2); SlideState = new PlayerSlideState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_SLIDE_HASH); ItemState = new PlayerItemState(this, _stateMachine, _playerData, AnimationConstants.PLAYER_USE_ITEM_HASH); }
private void Awake() { StateMachine = new PlayerStateMachine(); IdleState = new PlayerIdleState(this, StateMachine, playerData, "idle"); MoveState = new PlayerMoveState(this, StateMachine, playerData, "move"); JumpState = new PlayerJumpState(this, StateMachine, playerData, "inAir"); InAirState = new PlayerInAirState(this, StateMachine, playerData, "inAir"); LandState = new PlayerLandState(this, StateMachine, playerData, "land"); WallSlideState = new PlayerWallSlideState(this, StateMachine, playerData, "wallSlide"); WallGrabState = new PlayerWallGrabState(this, StateMachine, playerData, "wallGrab"); WallClimbState = new PlayerWallClimbState(this, StateMachine, playerData, "wallClimb"); WallJumpState = new PlayerWallJumpState(this, StateMachine, playerData, "inAir"); LedgeClimbState = new PlayerLedgeClimbState(this, StateMachine, playerData, "ledgeClimbState"); DashState = new PlayerDashState(this, StateMachine, playerData, "inAir"); CrouchIdleState = new PlayerCrouchIdleState(this, StateMachine, playerData, "crouchIdle"); CrouchMoveState = new PlayerCrouchMoveState(this, StateMachine, playerData, "crouchMove"); InjuredState = new PlayerInjuredState(this, StateMachine, playerData, "injured"); DeadState = new PlayerDeadState(this, StateMachine, playerData, "dead"); KickState = new PlayerKickState(this, StateMachine, playerData, "kick"); SlideKickState = new PlayerSlideKickState(this, StateMachine, playerData, "slideKick"); RollState = new PlayerRollState(this, StateMachine, playerData, "roll"); }