예제 #1
0
파일: Line.cs 프로젝트: jdkula/FloMoMa2018
    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++;
    }