Example #1
0
        protected void Update()
        {
            if (_stateManager.GetState() != State.Play && _activateControllerDebug == false)
            {
                return;
            }

            PlayerInput input;

            PlayerInput.Update(out input);

            if (input.move.y < 0f)
            {
                input.look.y = -input.look.y;
            }

            if (playerCharacter)
            {
                playerCharacter.Simulate(characterController, input);
            }
            if (_cameraAnimationInProgress == false)
            {
                FocusObjectUpdate();
            }
            if (_lookingAtCat == true && _currentCatInFocus != null)
            {
                if (Input.GetKeyDown(KeyCode.E))
                {
                    _currentCatInFocus.ActivatePet();
                }
            }
        }