Public methods
sortNoteGroup
static function sortNoteGroup(group:FlxTypedGroup<Note>):Void
Sorts one note group by y for the current scroll direction, reusing the
cached comparator instead of allocating a closure like
FlxTypedGroup.sort() does.
@param group PlayState.notes or PlayState.sustainNotes.
| Parameter | Type | Default |
|---|
group | FlxTypedGroup<Note> | — |
View source
addBehindGF
static function addBehindGF(state:PlayState, obj:FlxObject)
| Parameter | Type | Default |
|---|
state | PlayState | — |
obj | FlxObject | — |
View source
addBehindBF
static function addBehindBF(state:PlayState, obj:FlxObject)
| Parameter | Type | Default |
|---|
state | PlayState | — |
obj | FlxObject | — |
View source
addBehindDad
static function addBehindDad(state:PlayState, obj:FlxObject)
| Parameter | Type | Default |
|---|
state | PlayState | — |
obj | FlxObject | — |
View source
clearNotesBefore
static function clearNotesBefore(state:PlayState, time:Float)
| Parameter | Type | Default |
|---|
state | PlayState | — |
time | Float | — |
View source
KillNotes
static function KillNotes(state:PlayState)
| Parameter | Type | Default |
|---|
state | PlayState | — |
View source
invalidateNote
static function invalidateNote(state:PlayState, note:Note):Void
Queues a note for recycling at the end of the frame.
The killNotes array used to be scanned with contains() on every call,
which is O(live notes) per note per frame; the queue membership now lives on
the note itself. (#88)
| Parameter | Type | Default |
|---|
state | PlayState | — |
note | Note | — |
View source
destroyNotes
static function destroyNotes(state:PlayState):Void
Kills every queued note and empties the queue in place.
Runs once per frame, so it must not allocate: the previous killNotes = []
threw away a fresh array every frame and iterator() added another object
on top. Killed notes stay group members with exists == false, which is
exactly what FlxTypedGroup.recycle() picks up next time a note spawns.
| Parameter | Type | Default |
|---|
state | PlayState | — |
View source
spawnHoldSplashOnNote
static function spawnHoldSplashOnNote(state:PlayState, note:Note, isDad:Bool = false)
| Parameter | Type | Default |
|---|
state | PlayState | — |
note | Note | — |
isDad (optional) | Bool | false |
View source
spawnHoldSplash
static function spawnHoldSplash(state:PlayState, note:Note)
| Parameter | Type | Default |
|---|
state | PlayState | — |
note | Note | — |
View source
spawnNoteSplashOnNote
static function spawnNoteSplashOnNote(state:PlayState, isDad:Bool, note:Note)
| Parameter | Type | Default |
|---|
state | PlayState | — |
isDad | Bool | — |
note | Note | — |
View source
spawnNoteSplash
static function spawnNoteSplash(state:PlayState, x:Float, y:Float, data:Int, note:Note = null)
| Parameter | Type | Default |
|---|
state | PlayState | — |
x | Float | — |
y | Float | — |
data | Int | — |
note (optional) | Note | null |
View source
spawnCrossFade
static function spawnCrossFade(group:FlxTypedGroup<CrossFade>, character:Character, isDad:Bool = true):Void
Spawns a cross fade ghost out of its pool.
Replaces the old new CrossFade(...) call sites, which allocated a sprite, a
frames copy, an animation and a tween callback on every opponent note hit that
carried the effect. (#88)
@param group one of PlayState.grpCrossFade / grpGFCrossFade / grpBFCrossFade.
@param character the character to ghost.
@param isDad true on the opponent side of the strum line.
| Parameter | Type | Default |
|---|
group | FlxTypedGroup<CrossFade> | — |
character | Character | — |
isDad (optional) | Bool | true |
View source
generateStaticArrows
static function generateStaticArrows(state:PlayState, player:Int):Void
| Parameter | Type | Default |
|---|
state | PlayState | — |
player | Int | — |
View source
Internals
Private / internal members
| Field | Type | Static |
|---|
notesAscending | Note->Note->Int = compareNoteY.bind(FlxSort.ASCENDING) | yes |
notesDescending | Note->Note->Int = compareNoteY.bind(FlxSort.DESCENDING) | yes |
| Method |
|---|
static function compareNoteY(order:Int, note1:Note, note2:Note):Int |
static function clearGroupNotesBefore(group:FlxTypedGroup<Note>, time:Float) |
static function killNoteGroup(group:FlxTypedGroup<Note>) |