Codename LogoCodename Logo

funkin.game.StrumLine

APIWikiTools

Constructor

View in 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> = []

@: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 documention about this being a variable that can help when making multi key

vocals:FlxSound

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

Methods

View in GitHub

inlineaddHealth(health:Float):Void

View in 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 in GitHub

deleteNote(note:Note):Void

Deletes a note from this strumline.

Parameters:

note

Note to delete

View in GitHub

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

View in GitHub

inlinegenerateStrums(amount:Int = 4):Void