示例#1
0
    private void ClickInteraction(RaycastHit hit, MusicNote musicNoteHit, float soundPitch)
    {
        if (musicNoteHit.m_MusicNoteData.InBonusZone)
        {
            _highScoreManager.UpdateMultiplier();
        }
        else
        {
            _highScoreManager.ResetMultiplier();
        }

        //turn off collider so we can NOT click on the note 2 times in a row
        hit.collider.gameObject.GetComponent <BoxCollider>().enabled = false;

        musicNoteHit.m_MusicNoteData.CurrentMusicNoteState = MusicNoteState.Clicked;
        StartCoroutine(musicNoteHit.DissolveOnClick());

        AudioManager.Instance.Play("NoteOnHit", soundPitch);

        _highScoreManager.UpdateScore();
    }