Static variables

@:value("1.0.1")staticfinalread onlyCHARACTER_DATA_VERSION:String = "1.0.1"

The current version string for the stage data format. Handle breaking changes by incrementing this value and adding migration to the migrateStageData() function.

  • Version 1.0.1 adds death.cameraOffsets

@:value("1.0.x")staticfinalread onlyCHARACTER_DATA_VERSION_RULE:String = "1.0.x"

The current version rule check for the stage data format.

@:value("framelabel")staticfinalread onlyDEFAULT_ANIMTYPE:String = "framelabel"

@:value(false)staticfinalread onlyDEFAULT_APPLYSTAGEMATRIX:Bool = false

@:value({ swfMode : true, cacheOnLoad : false, filterQuality : 1, applyStageMatrix : false, useRenderTexture : false })staticfinalread onlyDEFAULT_ATLASSETTINGS:TextureAtlasData = { swfMode : true, cacheOnLoad : false, filterQuality : 1, applyStageMatrix : false, useRenderTexture : false }

@:value(1.0)staticfinalread onlyDEFAULT_DANCEEVERY:Float = 1.0

@:value(false)staticfinalread onlyDEFAULT_FLIPX:Bool = false

@:value(false)staticfinalread onlyDEFAULT_FLIPY:Bool = false

@:value(24)staticfinalread onlyDEFAULT_FRAMERATE:Int = 24

@:value([0, 25])staticfinalread onlyDEFAULT_HEALTHICON_OFFSETS:Array<Int> = [0, 25]

@:value(false)staticfinalread onlyDEFAULT_ISPIXEL:Bool = false

@:value(false)staticfinalread onlyDEFAULT_LOOP:Bool = false

@:value("Untitled Character")staticfinalread onlyDEFAULT_NAME:String = "Untitled Character"

@:value([0, 0])staticfinalread onlyDEFAULT_OFFSETS:Array<Float> = [0, 0]

@:value(CharacterRenderType.Sparrow)staticfinalread onlyDEFAULT_RENDERTYPE:CharacterRenderType = CharacterRenderType.Sparrow

@:value(1)staticfinalread onlyDEFAULT_SCALE:Float = 1

@:value([0, 0])staticfinalread onlyDEFAULT_SCROLL:Array<Float> = [0, 0]

@:value(8.0)staticfinalread onlyDEFAULT_SINGTIME:Float = 8.0

The default time the character should sing for, in steps. Values that are too low will cause the character to stop singing between notes. Values that are too high will cause the character to hold their singing pose for too long after they're done.

@:value("idle")staticfinalread onlyDEFAULT_STARTINGANIM:String = "idle"

Static methods

@:value({ debug : false })staticfetchCharacter(charId:String, debug:Bool = false):Null<BaseCharacter>

Fetches data for a character and returns a BaseCharacter instance, ready to be added to the scene.

Parameters:

charId

The character ID to fetch.

Returns:

The character instance, or null if the character was not found.

staticfetchCharacterData(charId:String):Null<CharacterData>

Fetches just the character data for a character.

Parameters:

charId

The character ID to fetch.

Returns:

The character data, or null if the character was not found.

staticgetCharPixelIconAsset(char:String):Null<FlxFrame>

Returns the idle frame of a character.

staticlistCharacterIds():Array<String>

Lists all the valid character IDs.

Returns:

An array of character IDs.

staticloadCharacterCache():Void

Parses and preloads the game's stage data and scripts when the game starts.

If you want to force stages to be reloaded, you can just call this function again.

staticparseCharacterData(charId:String):Null<CharacterData>

Load a character's JSON file and parse its data.

Parameters:

charId

The character to load.

Returns:

The character data, or null if validation failed.