void Start() { keyboardController = FindObjectOfType <KeyboardController>(); characterController = FindObjectOfType <CharacterController>(); gravityHandler = FindObjectOfType <GravityHandler>(); thirdPersonMovement = FindObjectOfType <ThirdPersonMovement>(); animator = FindObjectOfType <Animator>(); ledgeDetectionState = FindObjectOfType <LedgeDetectionState>(); grabbingLedgeState = new GrabbingLedgeState(); jumpingState = new JumpingState(); walkingState = new WalkingState(); currentState = walkingState; }
void Start() { ledgeDetectionState = GetComponentInParent <LedgeDetectionState>(); }