Codename LogoCodename Logo

funkin.game.StrumLine

APIWikiTools

Group of strums, that contains the strums and notes. Used in PlayState.

Static methods

View on GitHub

staticinlinecalculateStartingXPos(hudXRatio:Float, scale:Float, spacing:Float, keyCount:Int):Float

Constructor

View on GitHub

new(characters:Array<Character>, startingPos:FlxPoint, strumScale:Float, cpu:Bool = false, opponentSide:Bool = true, ?controls:Controls, vocalPrefix:String = "")

Variables

altAnim:Bool

Whenever alt animation is enabled on this strumline.

animSuffix:String = ""

Which animation suffix on characters that should be used when hitting notes.

characters:Array<Character>

Array containing all of the characters "attached" to those strums.

controls:Controls = null

Controls assigned to this strumline.

cpu:Bool = false

Whenever this strumline is controlled by cpu or not.

data:ChartStrumLine = null

Chart JSON data assigned to this StrumLine (Codename format)

extra:Map<String, Dynamic> = []

Extra data that can be added to the strum line.

@:isVarghostTapping:Null<Bool> = null

Whenever Ghost Tapping is enabled.

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) {});

opponentSide:Bool = false

Whenever this strumline is from the opponent side or the player side.

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.

vocals:FlxSound

Vocals sound (Vocals.ogg). Used for individual vocals per strumline.

Methods

View on GitHub

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

View on GitHub

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 (left = arrowLEFT, left press, left confirm).

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 true under certain conditions.

View on GitHub

deleteNote(note:Note):Void

Deletes a note from this strumline.

Parameters:

note

Note to delete

View on GitHub

generate(strumLine:ChartStrumLine, ?startTime:Float):Void

Generates the notes for the strumline.

View on GitHub

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)

View on GitHub

updateInput(id:Int = 0):Void

Updates the input for the strumline, and handles the input.

Parameters:

id

The ID of the strum

View on GitHub

updateNote(daNote:Note):Void

Updates a note. This updates the position, state, and handles the input.

View on GitHub

inlineupdateNotes():Void

Updates the notes.