A variant of SparrowPlayer which loads a BaseCharacter instead. This allows it to play appropriate animations based on song events.

Constructor

@:value({ defaultToBf : true })new(defaultToBf:Bool = true)

Variables

charId:String

read onlycharName:String

characterType:CharacterType

The character type (such as BF, Dad, GF, etc).

flip:Bool

@:value(1.0)targetScale:Float = 1.0

Methods

@:access(funkin.play.character.BaseCharacter)loadCharacter(id:String):Void

Loads a character by ID.

Parameters:

id

The ID of the character to load.

onBeatHit(event:SongTimeScriptEvent):Void

Called when an beat is hit in the song Used to play character animations.

Parameters:

event

The event.

onNoteGhostMiss(event:GhostMissNoteScriptEvent):Void

Called when a key is pressed but no note is hit in the song Used to play character animations.

Parameters:

event

The event.

onNoteHit(event:HitNoteScriptEvent):Void

Called when a note is hit in the song Used to play character animations.

Parameters:

event

The event.

onNoteHoldDrop(event:HoldNoteScriptEvent):Void

Called when a hold note is dropped in the song Used to play character animations.

Parameters:

event

The event.

onNoteMiss(event:NoteScriptEvent):Void

Called when a note is missed in the song Used to play character animations.

Parameters:

event

The event.

onStepHit(event:SongTimeScriptEvent):Void

Called when a step is hit in the song Used to play character animations.

Parameters:

event

The event.

onUpdate(event:UpdateScriptEvent):Void

Called when an update event is hit in the song. Used to play character animations.

Parameters:

event

The event.

@:value({ reversed : false, ignoreOther : false, restart : false })playAnimManually(name:String, restart:Bool = false, ignoreOther:Bool = false, reversed:Bool = false):Void