Example #1
0
        private void Start()
        {
            _controller = GetComponent <CharacterController>();
            _input      = GetComponent <StarterAssetsInputs>();

            // reset our timeouts on start
            _jumpTimeoutDelta = JumpTimeout;
            _fallTimeoutDelta = FallTimeout;
        }
Example #2
0
        private void Awake()
        {
            _input = new StarterAssetsInputs();

            // get a reference to our main camera
            if (_mainCamera == null)
            {
                _mainCamera = GameObject.FindGameObjectWithTag("MainCamera");
            }
        }
Example #3
0
        private void Start()
        {
            _hasAnimator = TryGetComponent(out _animator);
            _controller  = GetComponent <CharacterController>();
            _input       = GetComponent <StarterAssetsInputs>();

            AssignAnimationIDs();

            // reset our timeouts on start
            _jumpTimeoutDelta = JumpTimeout;
            _fallTimeoutDelta = FallTimeout;
        }