Static variables

staticSONG:SwagSong

SONG METADATA

@:value(0)staticcampaignScore:Int = 0

Score for the current week.

@:value(6)staticdaPixelZoom:Float = 6

Zoom for the pixel assets.

@:value("normal")staticdifficulty:String = "normal"

The selected difficulty name

@:value(false)staticfromMods:Bool = false

Whenever the week is coming from the mods folder or not.

@:value(null)staticinstance:PlayState = null

@:value(false)staticisStoryMode:Bool = false

Whenever the song is being played in Story Mode.

@:value([])staticstoryPlaylist:Array<String> = []

The remaining songs in the Story Mode playlist.

@:value(null)staticstoryWeek:WeekData = null

The week data of the current week

Constructor

new(?scriptsAllowed:Bool, ?scriptName:String)

Variables

@:value(new FlxTextFormat(0xFF888888, false, false, 0))accFormat:FlxTextFormat = new FlxTextFormat(0xFF888888, false, false, 0)

Format for the accuracy rating.

accuracy:Float

The player's accuracy (shortcut to accuracyPressedNotes / totalAccuracyAmount).

@:value(0)accuracyPressedNotes:Float = 0

The number of pressed notes.

accuracyTxt:FunkinText

FunkinText that shows your accuracy.

boyfriend:Character

Boyfriend character

camFollow:FlxObject

Object defining the camera follow target.

camGame:FlxCamera

Camera for the game (stages, characters)

camHUD:HudCamera

Camera for the HUD (notes, misses).

@:value(true)camZooming:Bool = true

Whenever cam zooming is enabled.

@:value(4)camZoomingInterval:Int = 4

Interval of cam zooming (beats). For example: if set to 4, the camera will zoom every 4 beats.

@:value(true)canAccessDebugMenus:Bool = true

Whenever the player can press 7, 8 or 9 to access the debug menus.

@:value(true)canDie:Bool = true

Whenever the player can die.

@:value(true)canPause:Bool = true

Whenever the game can be paused or not.

@:value(0)combo:Int = 0

Current combo.

@:value(false)comboBreaks:Bool = false

Whenever the misses should show "Combo Breaks" instead of "Misses"

comboGroup:FlxSpriteGroup

Group containing all of the combo sprites.

@:value([new ComboRating(0, "F", 0xFFFF4444), new ComboRating(0.1, "E", 0xFFFF8844), new ComboRating(0.2, "D", 0xFFFFAA44), new ComboRating(0.4, "C", 0xFFFFFF44), new ComboRating(0.6, "B", 0xFFAAFF44), new ComboRating(0.8, "A", 0xFF88FF44), new ComboRating(0.9, "S", 0xFF44FFFF), new ComboRating(1, "S++", 0xFF44FFFF)])comboRatings:Array<ComboRating> = [new ComboRating(0, "F", 0xFFFF4444), new ComboRating(0.1, "E", 0xFFFF8844), new ComboRating(0.2, "D", 0xFFFFAA44), new ComboRating(0.4, "C", 0xFFFFFF44), new ComboRating(0.6, "B", 0xFFAAFF44), new ComboRating(0.8, "A", 0xFF88FF44), new ComboRating(0.9, "S", 0xFF44FFFF), new ComboRating(1, "S++", 0xFF44FFFF)]

All combo ratings.

cpuStrums:FlxTypedGroup<Strum>

CPU strums.

curRating:ComboRating

Last rating (may be null)

read onlycurSection:SwagSection

Current section (can be null when using YoshiCrafter Engine charts).

@:value("")curSong:String = ""

Current song name (lowercase)

@:value("")curStage:String = ""

Current stage name

@:value(null)cutscene:String = null

Cutscene script path.

dad:Character

Dad character

@:value(1.05)defaultCamZoom:Float = 1.05

Camera zoom at which the game lerps to.

@:value("")detailsPausedText:String = ""

@:value("")detailsText:String = ""

@:value("")difficultyText:String = ""

downscroll:Bool

Whenever the game is in downscroll or not. (Can be set)

@:value(null)endCutscene:String = null

End cutscene script path.

@:value(false)endingSong:Bool = false

Whenever the song is ending or not.

@:value("gameOver")gameOverSong:String = "gameOver"

Game Over Song. (assets/music/gameOver.ogg)

@:value(false)generatedMusic:Bool = false

Whenever the music has been generated.

gf:Character

Girlfriend character

@:value(1)gfSpeed:Int = 1

Interval at which Girlfriend dances.

@:value(1)health:Float = 1

Current health. Goes from 0 to maxHealth (defaults to 2)

healthBar:FlxBar

Health bar.

healthBarBG:FlxSprite

Health bar background.

iconP1:HealthIcon

Player's icon

iconP2:HealthIcon

Opponent's icon

@:value("")iconRPC:String = ""

@:value(false)inCutscene:Bool = false

Whenever the game is currently in a cutscene or not.

inst:FlxSound

Instrumental sound (Inst.ogg).

@:value(5)introLength:Int = 5

Length of the intro countdown.

@:value(["intro3", "intro2", "intro1", "introGo"])introSounds:Array<String> = ["intro3", "intro2", "intro1", "introGo"]

Array of sounds for the intro.

@:value([null, "game/ready", "game/set", "game/go"])introSprites:Array<String> = [null, "game/ready", "game/set", "game/go"]

Array of sprites for the intro.

@:value("gameOverSFX")lossSFX:String = "gameOverSFX"

Game Over Song. (assets/sounds/gameOverSFX.ogg)

@:value(0)misses:Int = 0

The player's amount of misses.

missesTxt:FunkinText

FunkinText that shows your amount of misses.

@:value(true)muteVocalsOnMiss:Bool = true

Whenever the vocals should be muted when a note is missed.

@:value([null])noteTypesArray:Array<String> = [null]

Array containing all of the note types names.

notes:NoteGroup

Group of all of the notes. Using forEach on this group will only loop through the first notes.

@:value(false)paused:Bool = false

Whenever the game is paused or not.

@:value(isStoryMode)playCutscenes:Bool = isStoryMode

Whenever the game should play the cutscenes. Defaults to whenever the game is currently in Story Mode or not.

playerStrums:FlxTypedGroup<Strum>

Player strums.

@:value(0)ratingNum:Int = 0

Number of ratings.

@:value("gameOverEnd")retrySFX:String = "gameOverEnd"

Game Over End SFX, used when retrying. (assets/sounds/gameOverEnd.ogg)

scoreTxt:FunkinText

FunkinText that shows your score.

scripts:ScriptPack

Script Pack of all the scripts being ran.

@:value(0)scrollSpeed:Float = 0

Current scroll speed for all strums. To set a scroll speed for a specific strum, use strum.scrollSpeed.

@:value(0)songLength:Float = 0

@:value(0)songScore:Int = 0

The player's current score.

stage:Stage

Current Stage.

startTimer:FlxTimer

Timer for the start countdown

@:value(false)startedCountdown:Bool = false

Whenever the countdown has started or not.

@:value(false)startingSong:Bool = false

Whenever the song is currently being started.

strumLine:FlxObject

Strum line position

strumLineNotes:FlxTypedGroup<Strum>

All of the strum line notes.

@:value(0)totalAccuracyAmount:Float = 0

The total accuracy amount.

vocals:FlxSound

Vocals sound (Vocals.ogg).

Methods

@:value({ addAsDefaultIfUnknown : false })addNoteType(name:String, addAsDefaultIfUnknown:Bool = false):Int

countdown(swagCounter:Int):Void

Creates a fake countdown.

deleteNote(note:Note):Void

generateNotes(songData:SwagSong):Void

getNoteType(id:Int):String

nextSong():Void

pauseGame():Void

Inherited Variables

Defined by MusicBeatState

@:value(false)cancelConductorUpdate:Bool = false

Whenever the Conductor auto update should be enabled or not.

read onlycontrols:Controls

Game Controls.

read onlycurBeat:Int

Current beat

read onlycurBeatFloat:Float

Current beat, as a Float (ex: 1.24, instead of 1)

read onlycurStep:Int

Current step

read onlycurStepFloat:Float

Current step, as a Float (ex: 4.94, instead of 4)

@:value(null)scriptName:String = null

@:value(true)scriptsAllowed:Bool = true

read onlysongPos:Float

Current song position (in milliseconds).

stateScript:Script

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

call(name:String, ?args:Array<Dynamic>, ?defaultVal:Dynamic):Dynamic

event<T>(name:String, event:T):T

@:value({ fpsSensitive : false })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 independant of framerate.