Static variables
staticcoopMode:Bool = Flags.DEFAULT_COOP_MODE
Whenever the song is started with co-op mode on.
staticopponentMode:Bool = Flags.DEFAULT_OPPONENT_MODE
Whenever the song is 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, _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):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.
camZoomingEvery:BeatType = MEASURE
Beat type for interval of cam zooming. Example: If Beat Type is on STEP and Interval is 2, it'll zoom every 2 steps. NOTE: Will set to BEAT if not found any other time signatures unlike 4/4.
camZoomingInterval:Float = Flags.DEFAULT_CAM_ZOOM_INTERVAL
Interval of cam zooming (in conductor values). Example: If Interval is 1 and Beat Type is on MEASURE, it'll zoom every a measure. NOTE: Will set to 4 if not found any other time signatures unlike 4/4.
camZoomingOffset:Float = Flags.DEFAULT_CAM_ZOOM_OFFSET
Number of Conductor values to offset camZooming by.
camZoomingStrength:Float = Flags.DEFAULT_CAM_ZOOM_STRENGTH
How strong the cam zooms should be (defaults to 1).
canAccessDebugMenus:Bool = !Flags.DISABLE_EDITORS
Whenever the player can press 7, 8 or 9 to access the debug menus.
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.
defaultDisplayCombo:Bool = false
Whenever the Combo sprite should be shown or not (like old Week 7 patches).
NOTE: This is just a default value for the final value, the final value can be changed through notes hit events.
defaultDisplayRating:Bool = true
Whenever the Rating sprites should be shown or not.
NOTE: This is just a default value for the final value, the final value can be changed through notes hit events.
hitWindow:Float = Options.hitWindow
Hit window, in milliseconds. Defaults to 250ms unless changed in options. Base game hit window is 175ms.
iconArray:Array<HealthIcon> = []
Every active icon that will be updated during gameplay (defaults to iconP1
and iconP1
between create
and postCreate
in scripts).
maxCamZoom:Float = Math.NaN
Maximum amount of zoom for the camera (based on maxCamZoomMult
and the camera's zoom IF not set).
minDigitDisplay:Int = 10
Minimum Combo Count to display the combo digits. Anything less than 0 means it won't be shown.
muteVocalsOnMiss:Bool = Flags.DEFAULT_MUTE_VOCALS_ON_MISS
Whenever the vocals should be muted when a note is missed.
playCutscenes:Bool = isStoryMode
Whenever the game should play the cutscenes. Defaults to whenever the game is currently in Story Mode or not.
retrySFX:String = Flags.DEFAULT_GAMEOVEREND_SOUND
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
inlinegameAndCharsCall(func:String, ?parameters:Array<Dynamic>, ?charsFunc:String):Void
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 |
dynamicgetCharactersCamPos(chars:Array<Character>, ?pos:FlxPoint, ignoreInvisible:Bool = true):CamPosData
Returns the camera position of the specified characters.
Parameters:
chars | The characters to get the camera position of. |
---|---|
pos | The position to put the camera position in. If |
ignoreInvisible | Whenever invisible characters should be ignored. |
inlinegetStrumlineCamPos(strumLine:Int, ?pos:FlxPoint, ignoreInvisible:Bool = true):CamPosData
Returns the camera position of the specified strumline.
Parameters:
strumLine | The strumline to get the camera position of. |
---|---|
pos | The position to put the camera position in. If |
ignoreInvisible | Whenever invisible characters should be ignored. |
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, canSkipTransIn:Bool = true):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 |
canSkipTransIn | Bool that by default is true makes the in transition skip on certain types of cutscenes like dialogues. |
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. |