private void SetInitialVariables() { actualMovState = CharacterMovementState.Idle; pJumpState = CharacterJumpState.Grounded; cDirector = FindObjectOfType <CameraDirector>(); playerSizeX = SetPlayersizeX(); playerSizeY = SetPlayerSizeY(); groundDistance = playerSizeY / 2 + .02f; maxXSpeed = initialMaxSpeed; }
public CharacterStateMachine(PlatformerController controller) { _controller = controller; IdleState = new CharacterIdleState(this, _controller); MoveState = new CharacterMoveState(this, _controller); JumpState = new CharacterJumpState(this, _controller); FallingState = new CharacterFallingState(this, _controller); WallSlideState = new CharacterWallSlideState(this, _controller); WallJumpState = new CharacterWallJumpState(this, _controller); _state = IdleState; }
private void SetJumpState(CharacterJumpState incomingJumpState) { pJumpState = incomingJumpState; }
void ChangeJumpStatus(CharacterJumpState cs) { jumpStatus = cs; }