Ejemplo n.º 1
0
    public void PlayNote()
    {
        _audioSource.volume = Art.Volume;
        if (_diddy == null || _diddyIndex >= _diddy.GetLength(0))
        {
            _diddy      = MusicGenerator.GetDiddy(FullName.Length, FullName.GetHashCode());
            _diddyIndex = 0;
        }

        foreach (Note note in _diddy[_diddyIndex])
        {
            _audioSource.PlayOneShot(note.AudioClip);
        }
        _diddyIndex++;
    }