other notes

This commit is contained in:
Kade-gtihub
2025-11-18 14:03:57 -07:00
committed by Hundrec
parent 1734ec1dbf
commit 628c0e8975
+13 -1
View File
@@ -43,7 +43,7 @@ class NoteKind implements INoteScriptedClass
* Only accessible in scripts
* Defaults to true
*/
public var scoreable:Bool = true;
public var scoreable(default, default):Bool = true;
public function new(noteKind:String, description:String = "", ?noteStyleId:String, ?params:Array<NoteKindParam>, ?noanim:Bool, ?suffix:String)
{
@@ -72,6 +72,18 @@ class NoteKind implements INoteScriptedClass
});
}
/**
* Retrieve all notes NOT of this kind
* @return Array<NoteSprite>
*/
function getOtherNotes():Array<NoteSprite>
{
var allNotes:Array<NoteSprite> = PlayState.instance.playerStrumline.notes.members.concat(PlayState.instance.opponentStrumline.notes.members);
return allNotes.filter(function(note:NoteSprite) {
return note != null && note.noteData.kind != this.noteKind;
});
}
public function onScriptEvent(event:ScriptEvent):Void {}
public function onCreate(event:ScriptEvent):Void {}