Group of strums, that contains the strums and notes. Used in PlayState.
Static methods
staticinlinecalculateStartingXPos(hudXRatio:Float, scale:Float, spacing:Float, keyCount:Int):Float
Constructor
new(characters:Array<Character>, startingPos:FlxPoint, strumScale:Float, cpu:Bool = false, opponentSide:Bool = true, ?controls:Controls, vocalPrefix:String = "")
Variables
notes:NoteGroup
Group of all of the notes in this strumline. Using forEach
on this group will only loop through the first notes for performance reasons.
onHit:FlxTypedSignal<NoteHitEvent ‑> Void> = new FlxTypedSignal<NoteHitEvent>()
Signal that triggers whenever a note is hit. Similar to onPlayerHit and onDadHit, except strumline specific.
To add a listener, do
strumLine.onHit.add(function(e:NoteHitEvent) {});
onMiss:FlxTypedSignal<NoteMissEvent ‑> Void> = new FlxTypedSignal<NoteMissEvent>()
Signal that triggers whenever a note is missed. Similar to onPlayerMiss, except strumline specific.
To add a listener, do
strumLine.onMiss.add(function(e:NoteMissEvent) {});
onNoteDelete:FlxTypedSignal<SimpleNoteEvent ‑> Void> = new FlxTypedSignal<SimpleNoteEvent>()
Signal that triggers whenever a note is being deleted. Similar to onNoteDelete, except strumline specific.
To add a listener, do
strumLine.onNoteDelete.add(function(e:SimpleNoteEvent) {});
onNoteUpdate:FlxTypedSignal<NoteUpdateEvent ‑> Void> = new FlxTypedSignal<NoteUpdateEvent>()
Signal that triggers whenever a note is being updated. Similar to onNoteUpdate, except strumline specific.
To add a listener, do
strumLine.onNoteUpdate.add(function(e:NoteUpdateEvent) {});
strumAnimPrefix:Array<String> = ["left", "down", "up", "right"]
TODO: Write documentation about this being a variable that can help when making multi key
strumScale:Float = 1
The scale of the strums. If called after generate, the strums wont be scaled. You can only change it in the Charter.
Methods
inlineaddHealth(health:Float):Void
Adds/removes health to/from the strumline. If the strumline is an opponent strumline, it will subtract the health, otherwise it will add the health.
Parameters:
health | The amount of health to add/remove |
---|
createStrum(i:Int, ?animPrefix:String, ?spritePath:String, ?playIntroAnimation:Bool):Strum
Creates a strum and returns the created strum (needs to be added manually).
Parameters:
i | Index of the strum |
---|---|
animPrefix | (Optional) Animation prefix ( |
spritePath | (Optional) The sprite's graphic path if you don't want the default one. |
playIntroAnimation | (Optional) Whenever the intro animation should be played, by default might be |
deleteNote(note:Note):Void
Deletes a note from this strumline.
Parameters:
note | Note to delete |
---|
generate(strumLine:ChartStrumLine, ?startTime:Float):Void
Generates the notes for the strumline.
inlinegenerateStrums(amount:Int = -1):Void
Generates strums, and adds them to the strumline.
Parameters:
amount | The amount of strums to generate (-1 for the default amount) |
---|
updateInput(id:Int = 0):Void
Updates the input for the strumline, and handles the input.
Parameters:
id | The ID of the strum |
---|
updateNote(daNote:Note):Void
Updates a note. This updates the position, state, and handles the input.