Untitled

mail@pastecode.io avatar
unknown
csharp
3 years ago
605 B
2
Indexable
Never
    public override void RhythmEvent(RhythmEventData data) {
        int noteIndex = data.layer.markups.IndexOf(data.markup);
        if(noteIndex == 0) {
            FirstNoteOfLayer(data.layer.layerName);
        }
        if(noteIndex == data.layer.markups.Count - 1) {
            LastNoteOfLayer(data.layer.layerName);
        }
    }

    public void FirstNoteOfLayer(string layer) {
        Debug.Log("First note of layer " + layer + " was triggered");
    }

    public void LastNoteOfLayer(string layer) {
        Debug.Log("Last note of layer " + layer + " was triggered");
    }