public void init() { anim = GetComponent <Animator>(); vertical = Animator.StringToHash("Vertical"); horizontal = Animator.StringToHash("Horizontal"); inputHandler = GetComponentInParent <InputHandler>(); playerLoca = GetComponentInParent <PlayerLocomotion>(); }
private void Start() { inputHandler = GetComponent <InputHandler>(); anim = GetComponentInChildren <Animator>(); playerLocomotion = GetComponent <PlayerLocomotion>(); }