public void Initialize() { playerManager = GetComponentInParent <PlayerManager>(); animator = GetComponent <Animator>(); inputHandler = GetComponentInParent <InputHandler>(); playerLocomotion = GetComponentInParent <PlayerLocomotion>(); vertical = Animator.StringToHash("Vertical"); horizontal = Animator.StringToHash("Horizontal"); }
private void Start() { inputHandler = GetComponent <InputHandler>(); animator = GetComponentInChildren <Animator>(); playerLocomotion = GetComponent <PlayerLocomotion>(); }