Codename LogoCodename Logo

funkin.game.StrumLine

APIWiki

Constructor

View in GitHub

@:value({ vocalPrefix : "", opponentSide : true, cpu : false })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.

@:value("")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.

@:value(null)controls:Controls = null

Controls assigned to this strumline.

@:value(false)cpu:Bool = false

Whenever this strumline is controlled by cpu or not.

@:value(null)data:ChartStrumLine = null

Chart JSON data assigned to this StrumLine (Codename format)

@:value([])extra:Map<String, Dynamic> = []

@:value(null)@: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.

@:value(new FlxTypedSignal&lt;NoteHitEvent&gt;())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) {});

@:value(new FlxTypedSignal&lt;NoteMissEvent&gt;())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) {});

@:value(new FlxTypedSignal&lt;SimpleNoteEvent&gt;())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) {});

@:value(new FlxTypedSignal&lt;NoteUpdateEvent&gt;())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) {});

@:value(false)opponentSide:Bool = false

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

@:value(["left", "down", "up", "right"])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):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).

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

@:value({ amount : 4 })inlinegenerateStrums(amount:Int = 4):Void

View in GitHub

@:value({ id : 0 })updateInput(id:Int = 0):Void