An object used to retrieve data about a story mode level (also known as "weeks"). Can be scripted to override each function, for custom behavior.

Constructor

new(id:String, ?params:Dynamic)

Parameters:

id

The ID of the JSON file to parse.

Variables

final_data:Null<LevelData>

finalid:String

Methods

_fetchData(id:String):Null<LevelData>

buildBackground():FlxSprite

Build a sprite for the background of the level. Can be overriden by ScriptedLevel. Not used if isBackgroundSimple returns true.

Returns:

The constructed sprite

buildProps(?existingProps:Array<LevelProp>):Array<LevelProp>

Build the props for display over the colored background.

Parameters:

existingProps

The existing prop sprites, if any.

Returns:

The constructed prop sprites

buildTitleGraphic():FlxSprite

Construct the title graphic for the level.

Returns:

The constructed graphic as a sprite.

destroy():Void

getBackgroundColor():FlxColor

Returns true if the background is a solid color. If you have a ScriptedLevel with a fancy background, you may want to override this to false.

Returns:

The background as a simple color. May not be valid if isBackgroundSimple returns false.

getDifficulties():Array<String>

The list of difficulties the player can select from for this level.

Returns:

The difficulty IDs.

getSongDisplayNames(difficulty:String):Array<String>

Get the list of songs in this level, as an array of names, for display on the menu.

Parameters:

difficulty

The difficulty of the level being displayed

Returns:

The display names of the songs in this level

getSongs():Array<String>

Get the list of songs in this level, as an array of IDs.

Returns:

Array

getTitle():String

Retrieve the title of the level for display on the menu.

Returns:

Title of the level as a string

isBackgroundSimple():Bool

Returns true if the background is a solid color. If you have a ScriptedLevel with a fancy background, you may want to override this to false.

Returns:

Whether the background is a simple color

isUnlocked():Bool

Whether this level is unlocked. If not, it will be greyed out on the menu and have a lock icon. Override this in a script.

Returns:

Whether this level is unlocked

isVisible():Bool

Whether this level is visible. If not, it will not be shown on the menu at all. Override this in a script.

Returns:

Whether this level is visible in the menu

toString():String