private void Start() { _controller = GetComponent <CharacterController>(); _input = GetComponent <StarterAssetsInputs>(); // reset our timeouts on start _jumpTimeoutDelta = JumpTimeout; _fallTimeoutDelta = FallTimeout; }
private void Awake() { _input = new StarterAssetsInputs(); // get a reference to our main camera if (_mainCamera == null) { _mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); } }
private void Start() { _hasAnimator = TryGetComponent(out _animator); _controller = GetComponent <CharacterController>(); _input = GetComponent <StarterAssetsInputs>(); AssignAnimationIDs(); // reset our timeouts on start _jumpTimeoutDelta = JumpTimeout; _fallTimeoutDelta = FallTimeout; }