Static variables
staticopponentMode:Bool = false
Whenever the song has been started with opponent mode on.
staticseenCutscene:Bool = false
Whenever the game has already played a specific cutscene for the current song. Check startCutscene
for more details.
Static methods
static__loadSong(name:String, difficulty:String):Void
(INTERNAL) Loads a song without resetting story mode/opponent mode/coop mode values.
Parameters:
name | Song name |
---|---|
difficulty | Song difficulty |
staticloadSong(name:String, difficulty:String = "normal", opponentMode:Bool = false, coopMode:Bool = false):Void
Loads a song into PlayState
Parameters:
name | Song name |
---|---|
difficulty | Chart difficulty (if invalid, will load an empty chart) |
opponentMode | Whenever opponent mode is on |
coopMode | Whenever co-op mode is on. |
staticloadWeek(weekData:WeekData, difficulty:String = "normal"):Void
Load a week into PlayState.
Parameters:
weekData | Week Data |
---|---|
difficulty | Week Difficulty |
Constructor
Variables
accFormat:FlxTextFormat = new FlxTextFormat(0xFF888888, false, false, 0)
Format for the accuracy rating.
camZoomingInterval:Int = 4
Interval of cam zooming (beats). For example: if set to 4, the camera will zoom every 4 beats.
comboBreaks:Bool = !Options.ghostTapping
Whenever the misses should show "Combo Breaks" instead of "Misses"
comboRatings:Array<ComboRating> = [new ComboRating(0, "F", 0xFFFF4444), new ComboRating(0.5, "E", 0xFFFF8844), new ComboRating(0.7, "D", 0xFFFFAA44), new ComboRating(0.8, "C", 0xFFFFFF44), new ComboRating(0.85, "B", 0xFFAAFF44), new ComboRating(0.9, "A", 0xFF88FF44), new ComboRating(0.95, "S", 0xFF44FFFF), new ComboRating(1, "S++", 0xFF44FFFF)]
All combo ratings.
hitWindow:Float = Options.hitWindow
Hit window, in milliseconds. Defaults to 250ms unless changed in options. Base game hit window is 175ms.
introSprites:Array<String> = [null, "game/ready", "game/set", "game/go"]
Array of sprites for the intro.
playCutscenes:Bool = isStoryMode
Whenever the game should play the cutscenes. Defaults to whenever the game is currently in Story Mode or not.
retrySFX:String = "gameOverEnd"
Game Over End SFX, used when retrying. (assets/sounds/gameOverEnd.ogg)
scrollSpeed:Float = 0
Current scroll speed for all strums.
To set a scroll speed for a specific strum, use strum.scrollSpeed
.
strumLines:FlxTypedGroup<StrumLine> = new FlxTypedGroup<StrumLine>()
Array of all the players in the stage.
Methods
gameOver(?character:Character, ?deathCharID:String, ?gameOverSong:String, ?lossSFX:String, ?retrySFX:String):Void
Forces a game over.
Parameters:
character | Character which died. Default to |
---|---|
deathCharID | Character ID (name) for game over. Default to whatever is specified in the character's XML. |
gameOverSong | Song for the game over screen. Default to |
lossSFX | SFX at the beginning of the game over (Mic drop). Default to |
retrySFX | SFX played whenever the player retries. Defaults to |
goodNoteHit(strumLine:StrumLine, note:Note):Void
Hits a note
Parameters:
note | Note to hit. |
---|
nextSong():Void
Immediately switches to the next song, or goes back to the Story/Freeplay menu.
noteMiss(strumLine:StrumLine, note:Note, ?direction:Int, ?player:Int):Void
Misses a note
Parameters:
strumLine | The strumline the miss happened on. |
---|---|
note | Note to miss. |
direction | Specify a custom direction in case note is null. |
player | Specify a custom player in case note is null. |
startCutscene(prefix:String = "", ?cutsceneScriptPath:String, ?callback:() ‑> Void, checkSeen:Bool = false):Void
Starts a cutscene.
Parameters:
prefix | Custom prefix. Using |
---|---|
cutsceneScriptPath | Optional: Custom script path. |
callback | Callback called after the cutscene ended. If equals to |
checkSeen | Bool that by default is false, if true and |
dynamicupdateDiscordPresence():Void
Function used to update Discord Presence.
This function is dynamic, which means you can do updateDiscordPresence = function() {}
in scripts.
Inherited Variables
Defined by MusicBeatState
graphicCache:GraphicCacheSprite = new GraphicCacheSprite()
Dummy sprite used to cache graphics to GPU.
stateScripts:ScriptPack
Current injected script attached to the state. To add one, create a file at path "data/states/stateName" (ex: data/states/FreeplayState)
Inherited Methods
Defined by MusicBeatState
lerp(v1:Float, v2:Float, ratio:Float, fpsSensitive:Bool = false):Float
Shortcut to FlxMath.lerp
or CoolUtil.lerp
, depending on fpsSensitive
Parameters:
v1 | Value 1 |
---|---|
v2 | Value 2 |
ratio | Ratio |
fpsSensitive | Whenever the ratio should not be adjusted to run at the same speed independent of framerate. |