Exemple #1
0
        // Update is called once per frame
        void Update()
        {
            if (!PauseMenuController.gameIsPaused)
            {
                if (!_paused)
                {
                    if (!_torchDisabled && Input.GetKeyDown(KeyCode.Y))
                    {
                        if (_torchActive)
                        {
                            DeactivateTorch();
                        }
                        else
                        {
                            ActivateTorch();
                        }
                    }

                    if (!_instrumentDisabled && Input.GetKeyDown(KeyCode.P) && _controller2D.OnGround())
                    {
                        PlayInstrument();
                    }
                }
            }
        }
    private bool HandleInputAndPerformAttack()
    {
        if (Input.GetKeyDown(KeyCode.O) && _movementController2D.OnGround())
        {
            _characterAnimator.SetTrigger(AnimatorParameter.SLASH);
            StartCoroutine(PerformSlashWithDelay(_slashStartDelay));
            return(true);
        }

        return(false);
    }