404 Page not found
Page not found, sorry.
diff --git a/.gitignore b/.gitignore index df3d060e..59fb2c28 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ latest/windows/haxe/ !.vscode/settings.json !.vscode/tasks.json .haxelib/ +pages/ docs/doc.xml mods/Baldi's Basics in Funkin'/ \ No newline at end of file diff --git a/pages/404.html b/pages/404.html deleted file mode 100644 index d14baff1..00000000 --- a/pages/404.html +++ /dev/null @@ -1 +0,0 @@ -
Page not found, sorry.
playAnim(AnimName:String, Force:Bool = false, Context:PlayAnimContext = NONE, Reversed:Bool = false, Frame:Int = 0):Voidnew(X:Float = 0, Y:Float = 0, FieldWidth:Float = 0, ?Text:String, Size:Int = 16, Border:Bool = true)graphicCache:GraphicCacheSprite = new GraphicCacheSprite()Dummy sprite used to cache graphics to GPU.
stateScript:ScriptCurrent injected script attached to the state. To add one, create a file at path "data/states/stateName" (ex: data/states/FreeplayState)
lerp(v1:Float, v2:Float, ratio:Float, fpsSensitive:Bool = false):FloatShortcut 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. |
stateScript:ScriptCurrent injected script attached to the state. To add one, create a file at path "data/states/stateName" (ex: "data/states/PauseMenuSubstate.hx")
lerp(v1:Float, v2:Float, ratio:Float, fpsSensitive:Bool = false):FloatShortcut 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. |
COPIED DIRECTLY FROM LIME SOURCE CAUSE LIME IS SO FUCKING DUMB!!
staticloadModLib(path:String, force:Bool = false):AssetLibraryLoads a mod library from the specified path. Supports folders and zips.
Parameters:
modName | Name of the mod |
|---|---|
force | Whenever the mod should be reloaded if it has already been loaded |
staticswitchMod(mod:String):VoidSwitches mod - unloads all the other mods, then load this one.
Parameters:
null | libName |
|---|
staticfinalinlineread onlySOUND_EXT:String = "ogg"Preferred sound extension for the game's audio files.
-Currently is set to mp3 for web targets, and ogg for other targets.
staticgetFolderDirectories(key:String, addPath:Bool = false, source:AssetSource = BOTH):Array<String>staticgetFrames(key:String, assetsPath:Bool = false, ?library:String):Null<FlxFramesCollection>Gets frames at specified path.
Parameters:
key | Path to the frames |
|---|---|
library | (Additional) library to load the frames from. |
| .. | |
|---|---|
| AssetSource | |
| AssetsLibraryList | |
| LimeLibrarySymbol | COPIED DIRECTLY FROM LIME SOURCE CAUSE LIME IS SO FUCKING DUMB!! |
| ModsAssetLibrary | |
| ModsFolder | |
| ModsFolderLibrary | |
| Paths | |
| ZipFolderLibrary |
staticinlineread onlydefaultColor:FlxColor = 0xFF9271FDDefault background colors for songs without bg color
staticloadChartMeta(songName:String, difficulty:String = "normal", fromMods:Bool = true):ChartMetaDatastaticsave(songFolderPath:String, chart:ChartData, difficulty:String = "normal", ?saveSettings:ChartSaveSettings):ChartDataSaves the chart to the specific song folder path.
Parameters:
songFolderPath | Path to the song folder (ex: |
|---|---|
chart | Chart to save |
difficulty | Name of the difficulty |
saveSettings |
Returns:
Filtered chart used for saving.
inlineread onlyADDITIONAL:ChartStrumLineType = 2STRUMLINE IS MARKED AS ADDITIONAL - WILL BE PLAYED AS CPU EVEN IF OPPONENT MODE IS ENABLED
inlineread onlyOPPONENT:ChartStrumLineType = 0STRUMLINE IS MARKED AS OPPONENT - WILL BE PLAYED BY CPU, OR PLAYED BY PLAYER IF OPPONENT MODE IS ON
inlineread onlyPLAYER:ChartStrumLineType = 1STRUMLINE IS MARKED AS PLAYER - WILL BE PLAYED AS PLAYER, OR PLAYED AS CPU IF OPPONENT MODE IS ON
Class for THE Global Script, aka script that runs in the background at all times.
staticscriptExtensions:Array<String> = ["hx", "hscript", "hsc", "hxs", "lua"]All available script extensions
staticstaticVariables:Map<String, Dynamic> = []Use "static var thing = true;" in hscript to use those!! -are reset every mod switch so once you're done with them make sure to make them null!!
call(func:String, ?parameters:Array<Dynamic>):DynamicCalls the function func defined in the script.
Parameters:
func | Name of the function |
|---|---|
parameters | (Optional) Parameters of the function. |
Returns:
Result (if void, then null)
error(text:String, ?additionalInfo:Dynamic):VoidShows an error from this script.
Parameters:
text | Text of the error (ex: Null Object Reference). |
|---|---|
additionalInfo | Additional information you could provide. |
get(variable:String):DynamicGets the variable variable from the script's variables.
Parameters:
variable | Name of the variable. |
|---|
Returns:
Variable (or null if it doesn't exists)
set(variable:String, value:Dynamic):VoidGets the variable variable from the script's variables.
Parameters:
variable | Name of the variable. |
|---|
Returns:
Variable (or null if it doesn't exists)
setParent(variable:Dynamic):VoidSets a script's parent object so that its properties can be accessed easily. Ex: Passing PlayState.instance will allow boyfriend to be typed instead of PlayState.instance.boyfriend.
Parameters:
variable | Parent variable. |
|---|
setPublicMap(map:Map<String, Dynamic>):VoidHSCRIPT ONLY FOR NOW -Sets the "public" variables map for ScriptPack
inlineevent<T>(func:String, event:T):TSends an event to every single script, and returns the event.
Parameters:
func | Function to call |
|---|---|
event | Event (will be the first parameter of the function) |
Returns:
(modified by scripts)
preventDefault(c:Bool = false):VoidPrevents default action from occurring.
Parameters:
c | Whenever the scripts following this one should be called or not. (Defaults to |
|---|
toString():StringReturns a string representation of the event, in this format:
-[CancellableEvent]
-[CancellableEvent (Cancelled)]
Returns:
String
swagCounter:IntAt which count the countdown is. Normally goes 0-1-2-3-4 unless PlayState.instance.introLength is changed.
recycle(swagCounter:Int, volume:Float, soundPath:String, spritePath:String, scale:Float, antialiasing:Bool, sprite:FlxSprite, spriteTween:FlxTween, sound:FlxSound):CountdownEventrecycle(animName:String, direction:Int, suffix:String, context:PlayAnimContext, reversed:Bool, frame:Int, force:Bool = true):DirectionAnimEventpresenceData:DiscordPresenceOptionsObject containing all of the data for the presence. Can be altered.
recycle(idleAlpha:Float, idlePlayingAlpha:Float, selectedAlpha:Float, selectedPlayingAlpha:Float, lerp:Float):FreeplayAlphaUpdateEventjustPressed:Array<Bool>Array containing whenever a specific control was pressed (not hold) this frame or not.
-For example, justPressed[0] will return whenever the left strum was just pressed.
justReleased:Array<Bool>Array containing whenever a specific control was released this frame or not.
-For example, justReleased[0] will return whenever the left strum was just released.
pressed:Array<Bool>Array containing whenever a specific control is pressed or not.
-For example, pressed[0] will return whenever the left strum was pressed.
recycle(pressed:Array<Bool>, justPressed:Array<Bool>, justReleased:Array<Bool>, strumLine:StrumLine, strumLineID:Int):InputSystemEventrecycle(note:Note, strumID:Int, noteType:String, noteTypeID:Int, strumLineID:Int, mustHit:Bool, noteSprite:String, noteScale:Float, animSuffix:String):NoteCreationEventaccuracy:Null<Float>Accuracy gained from pressing this note. From 0 to 1. null means no accuracy is gained.
healthGain:FloatThe amount of health that'll be gained from pressing that note. If called from onPlayerMiss, the value will be negative.
preventLastSustainHit():VoidPrevents the sustain tail (the last one) from being automatically hit when the sustain before it is hit.
preventVocalsMute():VoidPrevents the vocals volume from being muted in case its a parameter of onPlayerMiss
recycle(misses:Bool = true, countAsCombo:Bool = true, countScore:Bool = true, ?showRating:Bool, note:Note, characters:Array<Character>, player:Bool, noteType:String, animSuffix:String, ratingPrefix:String, ratingSuffix:String, direction:Int, score:Int, accuracy:Null<Float>, healthGain:Float, rating:String = "sick", showSplash:Bool = false, numScale:Float = 0.5, numAntialiasing:Bool = true, ratingScale:Float = 0.7, ratingAntialiasing:Bool = true, forceAnim:Bool = true):NoteHitEventaccuracy:Null<Float>Accuracy gained from pressing this note. From 0 to 1. null means no accuracy is gained.
animSuffix:StringSuffix of the animation. "miss" for miss notes, "-alt" for alt notes, "" for normal ones.
healthGain:FloatThe amount of health that'll be gained from missing that note. If called from onPlayerMiss, the value will be negative.
preventVocalsMute():VoidPrevents the vocals volume from being muted in case its a parameter of onPlayerMiss
recycle(note:Note, score:Int, misses:Int, muteVocals:Bool, healthGain:Float, missSound:String, missVolume:Float, ghostMiss:Bool, gfSad:Bool, gfSadAnim:String, forceGfAnim:Bool, forceAnim:Bool, animSuffix:String, characters:Array<Character>, playerID:Int, noteType:String, direction:Int, accuracy:Null<Float>):NoteMissEventCANCEL this event to prevent default behaviour!
Contains all contexts possible for PlayAnimEvent.
inlineread onlyDANCE:PlayAnimContext = "DANCE"Whenever a dance animation is played. -The character's dancing wont be blocked.
inlineread onlyLOCK:PlayAnimContext = "LOCK"Locks the character's animation. -Prevents the character from dancing, even if the animation ended.
inlineread onlyMISS:PlayAnimContext = "MISS"Whenever a note is missed and a miss animation will be played. -Only for scripting, since it has the same effects as SING.
inlineread onlyNONE:PlayAnimContext = nullNo context was given for the animation. -The character won't dance until the animation is finished
inlineread onlySING:PlayAnimContext = "SING"Whenever a note is hit and a sing animation will be played. -The character will only dance after their holdTime is reached.
recycle(animName:String, force:Bool, reverse:Bool, startingFrame:Int = 0, context:PlayAnimContext):PlayAnimEventrecycle(strum:Strum, player:Int, strumID:Int, animPrefix:String, sprite:String = "game/notes/default"):StrumCreationEvent| .. | |
|---|---|
| events | |
| DummyScript | Simple class for empty scripts or scripts whose language isn't imported yet. |
| EventManager | |
| GlobalScript | Class for THE Global Script, aka script that runs in the background at all times. |
| HScript | |
| ModState | |
| ModSubState | |
| MultiThreadedScript | |
| Script | |
| ScriptPack | |
Class for custom shaders.
-To create one, create a shaders folder in your assets/mod folder, then add a file named my-shader.frag or/and my-shader.vert.
Non-existent shaders will only load the default one, and throw a warning in the console.
-To access the shader's uniform variables, use shader.variable
new(name:String, glslVersion:String = "120")Creates a new custom shader
Parameters:
name | Name of the frag and vert files. |
|---|---|
glslVersion | GLSL version to use. Defaults to |
new(frag:String, vert:String, glslVer:String = "120")Creates a new shader from the specified fragment and vertex source.
-Accepts #pragma header.
Parameters:
frag | Fragment source (pass |
|---|---|
vert | Vertex source (pass |
glslVer | Version of GLSL to use (defaults to 120) |
staticfinalread onlydefaultFragmentSource:String = "#pragma header\r\n\r\nvoid main(void)\r\n{\r\n\tgl_FragColor = flixel_texture2D(bitmap, openfl_TextureCoordv);\r\n}"staticfinalread onlydefaultVertexSource:String = "#pragma header\r\n\r\nattribute float alpha;\r\nattribute vec4 colorMultiplier;\r\nattribute vec4 colorOffset;\r\nuniform bool hasColorTransform;\r\n\r\nvoid main(void)\r\n{\r\n\t#pragma body\r\n\r\n\topenfl_Alphav = openfl_Alpha * alpha;\r\n\r\n\tif (hasColorTransform)\r\n\t{\r\n\t\topenfl_ColorOffsetv = colorOffset / 255.0;\r\n\t\topenfl_ColorMultiplierv = colorMultiplier;\r\n\t}\r\n}"staticfinalread onlyfragBody:String = "vec4 color = texture2D (bitmap, openfl_TextureCoordv);\r\n\r\nif (color.a == 0.0) {\r\n\r\n\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\r\n\r\n} else if (openfl_HasColorTransform) {\r\n\r\n\tcolor = vec4 (color.rgb / color.a, color.a);\r\n\r\n\tmat4 colorMultiplier = mat4 (0);\r\n\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\r\n\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\r\n\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\r\n\tcolorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;\r\n\r\n\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\r\n\r\n\tif (color.a > 0.0) {\r\n\r\n\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\r\n\r\n\t} else {\r\n\r\n\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\r\n\r\n\t}\r\n\r\n} else {\r\n\r\n\tgl_FragColor = color * openfl_Alphav;\r\n\r\n}"staticfinalread onlyfragHeader:String = "varying float openfl_Alphav;\r\nvarying vec4 openfl_ColorMultiplierv;\r\nvarying vec4 openfl_ColorOffsetv;\r\nvarying vec2 openfl_TextureCoordv;\r\n\r\nuniform bool openfl_HasColorTransform;\r\nuniform vec2 openfl_TextureSize;\r\nuniform sampler2D bitmap;\r\n\r\nuniform bool hasTransform;\r\nuniform bool hasColorTransform;\r\n\r\nvec4 flixel_texture2D(sampler2D bitmap, vec2 coord)\r\n{\r\n\tvec4 color = texture2D(bitmap, coord);\r\n\tif (!hasTransform)\r\n\t{\r\n\t\treturn color;\r\n\t}\r\n\r\n\tif (color.a == 0.0)\r\n\t{\r\n\t\treturn vec4(0.0, 0.0, 0.0, 0.0);\r\n\t}\r\n\r\n\tif (!hasColorTransform)\r\n\t{\r\n\t\treturn color * openfl_Alphav;\r\n\t}\r\n\r\n\tcolor = vec4(color.rgb / color.a, color.a);\r\n\r\n\tmat4 colorMultiplier = mat4(0);\r\n\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\r\n\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\r\n\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\r\n\tcolorMultiplier[3][3] = openfl_ColorMultiplierv.w;\r\n\r\n\tcolor = clamp(openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\r\n\r\n\tif (color.a > 0.0)\r\n\t{\r\n\t\treturn vec4(color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\r\n\t}\r\n\treturn vec4(0.0, 0.0, 0.0, 0.0);\r\n}\r\n\r\nuniform vec4 _camSize;\r\n\r\nfloat map(float value, float min1, float max1, float min2, float max2) {\r\n\treturn min2 + (value - min1) * (max2 - min2) / (max1 - min1);\r\n}\r\n\r\nvec2 getCamPos(vec2 pos) {\r\n\tvec4 size = _camSize / vec4(openfl_TextureSize, openfl_TextureSize);\r\n\treturn vec2(map(pos.x, size.x, size.x + size.z, 0.0, 1.0), map(pos.y, size.y, size.y + size.w, 0.0, 1.0));\r\n}\r\nvec2 camToOg(vec2 pos) {\r\n\tvec4 size = _camSize / vec4(openfl_TextureSize, openfl_TextureSize);\r\n\treturn vec2(map(pos.x, 0.0, 1.0, size.x, size.x + size.z), map(pos.y, 0.0, 1.0, size.y, size.y + size.w));\r\n}\r\nvec4 textureCam(sampler2D bitmap, vec2 pos) {\r\n\treturn flixel_texture2D(bitmap, camToOg(pos));\r\n}"staticfinalread onlyvertBody:String = "openfl_Alphav = openfl_Alpha;\r\nopenfl_TextureCoordv = openfl_TextureCoord;\r\n\r\nif (openfl_HasColorTransform) {\r\n\r\n\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\r\n\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\r\n\r\n}\r\n\r\ngl_Position = openfl_Matrix * openfl_Position;"staticfinalread onlyvertHeader:String = "attribute float openfl_Alpha;\r\nattribute vec4 openfl_ColorMultiplier;\r\nattribute vec4 openfl_ColorOffset;\r\nattribute vec4 openfl_Position;\r\nattribute vec2 openfl_TextureCoord;\r\n\r\nvarying float openfl_Alphav;\r\nvarying vec4 openfl_ColorMultiplierv;\r\nvarying vec4 openfl_ColorOffsetv;\r\nvarying vec2 openfl_TextureCoordv;\r\n\r\nuniform mat4 openfl_Matrix;\r\nuniform bool openfl_HasColorTransform;\r\nuniform vec2 openfl_TextureSize;"| .. | |
|---|---|
| CustomShader | Class for custom shaders. |
| FunkinShader | |
| ShaderTemplates | |
| ShaderTypeException |
staticbeatsPerMesure:Float = 4Number of beats per mesure (top number in time signature). Defaults to 4.
staticstepsPerBeat:Float = 4Number of steps per beat (bottom number in time signature). Defaults to 4.
staticmapBPMChanges(song:ChartData):VoidMaps BPM changes from a song.
Parameters:
song | Song to map BPM changes from. |
|---|
Since, in many cases multiple actions should use similar keys, we don't want the -rebinding UI to list every action. ActionBinders are what the user perceives as -an input so, for instance, they can't set jump-press and jump-release to different keys.
A list of actions that a player would invoke via some input device. -Uses FlxActions to funnel various inputs to a single action.
bindButtons(control:Control, id:Int, buttons:Array<FlxGamepadInputID>):VoidSets all actions that pertain to the binder to trigger when the supplied keys are used. -If binder is a literal you can inline this
bindKeys(control:Control, keys:Array<FlxKey>):VoidSets all actions that pertain to the binder to trigger when the supplied keys are used. -If binder is a literal you can inline this
unbindButtons(control:Control, gamepadID:Int, buttons:Array<FlxGamepadInputID>):VoidSets all actions that pertain to the binder to trigger when the supplied keys are used. -If binder is a literal you can inline this
unbindKeys(control:Control, keys:Array<FlxKey>):VoidSets all actions that pertain to the binder to trigger when the supplied keys are used. -If binder is a literal you can inline this
new(?gameWidth:Int, ?gameHeight:Int, ?initialState:Class<FlxState>, ?updateFramerate:Int, ?drawFramerate:Int, ?skipSplash:Bool, ?startFullscreen:Bool)Dummy FlxSprite that allows you to cache FlxGraphics, and immediatly send them to GPU memory.
nonRenderedCachedGraphics:Array<FlxGraphic> = []Array containing all of the non rendered (not sent to GPU) cached graphics.
Simple state used for loading the game
recycleLoop(?ObjectClass:Class<FlxSprite>, ?ObjectFactory:() ‑> FlxSprite, Force:Bool = false, Revive:Bool = true):FlxSprite| .. | |
|---|---|
| AssetTreeInfo | |
| CodenameBuildField | |
| ConductorInfo | |
| FlixelInfo | |
| Framerate | |
| FramerateCategory | |
| FramerateCounter | |
| MemoryCounter | |
| SystemInfo |
staticinlinefilterReleases(releases:Array<GitHubRelease>, keepPrereleases:Bool = true, keepDrafts:Bool = false):Array<GitHubRelease>Filters all releases gotten by getReleases
Parameters:
releases | Releases |
|---|---|
keepPrereleases | Whenever to keep Pre-Releases. |
keepDrafts | Whenever to keep Drafts. |
Returns:
Filtered releases.
staticgetContributors(user:String, repository:String, ?onError:Exception ‑> Void):Array<GitHubContributor>staticgetReleases(user:String, repository:String, ?onError:Exception ‑> Void):Array<GitHubRelease>Gets all the releases from a specific GitHub repository using the GitHub API.
Parameters:
user | |
|---|---|
repository |
Returns:
Releases
| .. | |
|---|---|
| GitHub | |
| GitHubAsset | |
| GitHubContributor | |
| GitHubException | |
| GitHubReactions | |
| GitHubRelease | |
| GitHubUser | |
| GitHubUserType |
| .. | |
|---|---|
| framerate | |
| github | |
| interfaces | |
| macros | |
| modules | |
| net | |
| Action | |
| BPMChangeEvent | ... -@author |
| CommandLineHandler | |
| Conductor | |
| Control | Since, in many cases multiple actions should use similar keys, we don't want the -rebinding UI to list every action. ActionBinders are what the user perceives as -an input so, for instance, they can't set jump-press and jump-release to different keys. |
| Controls | A list of actions that a player would invoke via some input device. -Uses FlxActions to funnel various inputs to a single action. |
| Device | |
| ErrorCode | |
| FunkinGame | |
| FunkinRatioScaleMode | |
| GraphicCacheSprite | Dummy FlxSprite that allows you to cache FlxGraphics, and immediatly send them to GPU memory. |
| KeyboardScheme | |
| Level | |
| LogText | |
| Logs | |
| Main | |
| MainState | Simple state used for loading the game |
| OptimizedBitmapData | |
| RotatingSpriteGroup | |
| .. | |
|---|---|
| IBeatReceiver | |
| IOffsetCompatible |
| .. | |
|---|---|
| DefinesMacro | |
| GitCommitMacro |
getBitmapData(id:String):BitmapDataRetrieves a cached BitmapData.
Parameters:
id | The ID of the cached BitmapData |
|---|
Returns:
The cached BitmapData instance
getFont(id:String):FontRetrieves a cached Font.
Parameters:
id | The ID of the cached Font |
|---|
Returns:
The cached Font instance
getSound(id:String):SoundRetrieves a cached Sound.
Parameters:
id | The ID of the cached Sound |
|---|
Returns:
The cached Sound instance
hasBitmapData(id:String):BoolChecks whether a BitmapData asset is cached.
Parameters:
id | The ID of a BitmapData asset |
|---|
Returns:
Whether the object has been cached
hasFont(id:String):BoolChecks whether a Font asset is cached.
Parameters:
id | The ID of a Font asset |
|---|
Returns:
Whether the object has been cached
hasSound(id:String):BoolChecks whether a Sound asset is cached.
Parameters:
id | The ID of a Sound asset |
|---|
Returns:
Whether the object has been cached
removeBitmapData(id:String):BoolRemoves a BitmapData from the cache.
Parameters:
id | The ID of a BitmapData asset |
|---|
Returns:
true if the asset was removed, false if it was not in the cache
removeFont(id:String):BoolRemoves a Font from the cache.
Parameters:
id | The ID of a Font asset |
|---|
Returns:
true if the asset was removed, false if it was not in the cache
removeSound(id:String):BoolRemoves a Sound from the cache.
Parameters:
id | The ID of a Sound asset |
|---|
Returns:
true if the asset was removed, false if it was not in the cache
| .. | |
|---|---|
| CrashHandler | |
| FunkinCache | |
| PlayingSound |
staticgetMostPresentColor(bmap:BitmapData):FlxColorReturns the most present color in a Bitmap.
Parameters:
bmap | Bitmap |
|---|
Returns:
FlxColor Color that is the most present.
staticgetMostPresentSaturatedColor(bmap:BitmapData):FlxColorReturns the most present saturated color in a Bitmap.
Parameters:
bmap | Bitmap |
|---|
Returns:
FlxColor Color that is the most present.
staticinlineaddEndZeros(str:String, num:Int):StringAdd several zeros at the end of a string, so that 2 becomes 20, useful for ms.
Parameters:
str | String to add zeros |
|---|---|
num | The length required |
staticinlineaddZeros(str:String, num:Int):StringAdd several zeros at the beginning of a string, so that 2 becomes 02.
Parameters:
str | String to add zeros |
|---|---|
num | The length required |
staticinlinecameraCenter(obj:FlxObject, cam:FlxCamera, axes:FlxAxes = XY):VoidCenters an object in a camera's field, basically screenCenter() but camera.width and camera.height are used instead of FlxG.width and FlxG.height.
Parameters:
obj | Sprite to center |
|---|---|
cam | Camera |
axes | Axes (XY) |
staticcoolTextFile(path:String):Array<String>Allows you to split a text file from a path, into a "cool text file", AKA a list. Allows for comments. For example,
-# comment
-test1
-
-test2
-will return ["test1", "test2"]
Parameters:
path |
|---|
Returns:
Array
staticinlinecopyColorTransform(color1:ColorTransform, color2:ColorTransform):VoidCopies a color transform from color1 to color2
Parameters:
color1 | Color transform to copy to |
|---|---|
color2 | Color transform to copy from |
staticdeleteFolder(delete:String):VoidDeletes a folder recursively
Parameters:
delete | Path to the folder. |
|---|
staticinlinefloorInt(e:Float):IntEquivalent of Math.floor, except doesn't require a Int -> Float -> Int conversion.
Parameters:
e | Value to get the floor of. |
|---|
staticinlinefpsLerp(v1:Float, v2:Float, ratio:Float):FloatAlternative linear interpolation function for each frame use, without worrying about framerate changes.
Parameters:
v1 | Begin value |
|---|---|
v2 | End value |
ratio | Ratio |
Returns:
Float Final value
staticinlinegetAtt(xml:Access, name:String):StringGets an XML attribute from an Access abstract, without throwing an exception if invalid.
-Example: xml.getAtt("test").getDefault("Hello, World!");
Parameters:
xml | XML to get the attribute from |
|---|---|
name | Name of the attribute |
staticgetColorFromDynamic(c:Dynamic):Null<FlxColor>Tries to get a color from a Dynamic variable.
Parameters:
c |
|
|---|
Returns:
The result color, or null if invalid.
staticinlinegetFPSRatio(ratio:Float):FloatModifies a lerp ratio based on current FPS to keep a stable speed on higher framerate.
Parameters:
ratio | Ratio |
|---|
Returns:
FPS-Modified Ratio
staticinlinegetMacroAbstractClass(className:String):Class<Dynamic>Gets the macro class created by hscript-improved for an abstract / enum
staticgetSizeString(size:Float):StringReturns a string representation of a size, following this format: 1.02 GB, 134.00 MB
Parameters:
size | Size to convert ot string |
|---|
Returns:
String Result string representation
staticinlineindexOfFromLast<T>(array:Array<T>, element:T):IntBasically indexOf, but starts from the end.
Parameters:
array | Array to scan |
|---|---|
element | Element |
Returns:
Index, or -1 if unsuccessful.
staticinlinekeyToString(key:Null<FlxKey>):StringReturns a simple string representation of a FlxKey. Used in Controls options.
Parameters:
key | Key |
|---|
Returns:
Simple representation
staticinlinelast<T>(array:Array<T>):TReturns the last of an Array
Parameters:
array | Array |
|---|
Returns:
T Last element
staticinlinelerpColor(color1:FlxColor, color2:FlxColor, ratio:Float, fpsSensitive:Bool = false):FlxColorLerps from color1 into color2 (Shortcut to FlxColor.interpolate)
Parameters:
color1 | Color 1 |
|---|---|
color2 | Color 2 |
ratio | Ratio |
fpsSensitive | Whenever the ratio should be fps sensitive (adapted when game is running at 120 instead of 60) |
staticloadAnimatedGraphic(spr:FlxSprite, path:String):FlxSpriteLoads an animated graphic, and automatically animates it.
Parameters:
spr | Sprite to load the graphic for |
|---|---|
path | Path to the graphic |
staticinlinemaxInt(p1:Int, p2:Int):IntEquivalent of Math.max, except doesn't require a Int -> Float -> Int conversion.
Parameters:
p1 | |
|---|---|
p2 |
Returns:
return p1 < p2 ? p2 : p1
staticinlinenumberArray(max:Int, min:Int = 0):Array<Int>Returns an array of number from min to max. Equivalent of [for (i in min...max) i].
Parameters:
max | Max value |
|---|---|
min | Minimal value (0) |
Returns:
Array
staticparseJson(assetPath:String):UnknownShortcut to parse JSON from an Asset path
Parameters:
assetPath | Path to the JSON asset. |
|---|
staticinlineparseJsonString(str:String):UnknownShortcut to parse a JSON string
Parameters:
str | Path to the JSON string |
|---|
Returns:
Parsed JSON
staticinlineplayMenuSFX(menuSFX:CoolSfx = SCROLL, volume:Float = 1):VoidPlays a specified Menu SFX.
Parameters:
menuSFX | Menu SFX to play |
|---|---|
volume | At which volume it should play |
staticplayMusic(path:String, Persist:Bool = false, Volume:Int = 1, Looped:Bool = true, DefaultBPM:Int = 102, ?Group:FlxSoundGroup):VoidPlays music, while resetting the Conductor, and taking info from INI in count.
Parameters:
path | Path to the music |
|---|---|
Persist | Whenever the music should persist while switching states |
DefaultBPM | Default BPM of the music (102) |
Volume | Volume of the music (1) |
Looped | Whenever the music loops (true) |
Group | A group that this music belongs to (default) |
staticpreloadCharacter(name:String, ?spriteName:String):VoidPreloads a character.
Parameters:
name | Character name |
|---|---|
spriteName | (Optional) sprite name. |
staticinlinepushGroup<T>(array:Array<T>, args:Rest<T>):Array<T>Push an entire group into an array.
Parameters:
array | Array to push the group into |
|---|---|
...args | Group entries |
Returns:
Array
staticinlinereplay(sound:FlxSound):VoidStops a sound, set its time to 0 then play it again.
Parameters:
sound | Sound to replay. |
|---|
staticresetSprite(spr:FlxSprite, x:Float, y:Float):VoidResets an FlxSprite
Parameters:
spr | Sprite to reset |
|---|---|
x | New X position |
y | New Y position |
staticsetFieldDefault<T>(v:Dynamic, name:String, defaultValue:T):TSets a field's default value, and returns it. In case it already exists, returns the existing one.
Parameters:
v | Dynamic to set the default value to |
|---|---|
name | Name of the value |
defaultValue | Default value |
Returns:
T New/old value.
staticinlinesetMusic(frontEnd:SoundFrontEnd, music:FlxSound):VoidSets a SoundFrontEnd's music to a FlxSound.
-Example: FlxG.sound.setMusic(music);
Parameters:
frontEnd | SoundFrontEnd to set the music of |
|---|---|
music | Music |
staticinlinesetSpriteSize(sprite:FlxSprite, width:Float, height:Float):VoidEquivalent of setGraphicSize, except that it can accept floats and automatically updates the hitbox.
Parameters:
sprite | Sprite to set the size of |
|---|---|
width | Width |
height | Height |
staticinlinesetUnstretchedGraphicSize(sprite:FlxSprite, width:Int, height:Int, fill:Bool = true, maxScale:Float = 0):VoidAllows you to set a graphic size (ex: 150x150), with proper hitbox without a stretched sprite.
Parameters:
sprite | Sprite to apply the new graphic size to |
|---|---|
width | Width |
height | Height |
fill | Whenever the sprite should fill instead of shrinking (true) |
maxScale | Maximum scale (0 / none) |
staticswitchAnimFrames(anim1:FlxAnimation, anim2:FlxAnimation):VoidSwitches frames from 2 FlxAnimations.
Parameters:
anim1 | First animation |
|---|---|
anim2 | Second animation |
staticinlinetimeToStr(time:Float):StringConverts a timestamp to a readable format such as 01:22 (mm:ss)
staticstartMultithreadedScript(path:String):MultiThreadedScriptStarts a new multithreaded script. -This script will share all the variables with the current one, which means already existing callbacks will be replaced by new ones on conflict.
Parameters:
null | path |
|---|
Additional class for FlxColor lerping.
-Gets rid of precision issues with FlxColor.interpolate
FlxBasic allowing you to disable those elements from the parent state while this substate is opened -- Tweens -- Camera Movement -- Timers -- Sounds
-To use, add add(new FunkinParentDisabler()); after super.create(); in your create function.
DOESNT SUPPORT CATEGORIES YET!!
staticcreateAdvancedMarkerPair(marker:String, color:FlxColor, size:Null<Float>, bold:Bool = false, italic:Bool = false, underline:Bool = false, ?blockIndent:Int, ?bullet:Bool):FlxTextFormatMarkerPairstaticparseEmote(text:String, emote:String, beginning:String, end:String, emoteEnd:String = "\n"):StringClass for Windows-only functions, such as transparent windows, message boxes, and more. -Does not have any effect on other platforms.
staticsetConsoleColors(foregroundColor:ConsoleColor = LIGHTGRAY, backgroundColor:ConsoleColor = BLACK):VoidSets the console colors
staticshowMessageBox(caption:String, message:String, icon:MessageBoxIcon = MSG_WARNING):VoidShows a message box
All types of utils only usable in a sorted array.
staticinlineaddSorted<T>(array:Array<T>, val:T, getVal:T ‑> Float):VoidAdds to a sorted array, using binary search.
Parameters:
array | Array to add to |
|---|---|
val | Value to add |
getVal | Function that returns the value that needs to be sorted |
staticinlinebinarySearch<T>(array:Array<T>, val:Float, getVal:T ‑> Float):IntGets the index of a possible new element of an Array of T using an efficient algorithm.
Parameters:
array | Array of T to check in |
|---|---|
getVal | Function that returns the position value of T |
Returns:
Index
Class that extends Reader allowing you to load ZIP entries without blowing your RAM up!! -Half of the code is taken from haxe libraries btw
staticopenFromFile(path:String):SysZipOpens a zip from a specified path.
Parameters:
path | Path to the zip file. |
|---|
readEntryData(e:SysZipEntry):BytesReads all the data present in a specified entry.
-NOTE: If the entry is compressed, the data won't be decompressed. For decompression, use unzipEntry.
Parameters:
e | Entry |
|---|
unzipEntry(f:SysZipEntry):BytesUnzips and returns all of the data present in an entry.
Parameters:
f | Entry to read from. |
|---|
Class made to make XML parsing easier.
staticaddXMLAnimation(sprite:FlxSprite, anim:Access, loop:Bool = false):ErrorCodeAdds an XML animation to sprite.
Parameters:
sprite | Destination sprite |
|---|---|
anim | Animation (Must be a |
staticapplyXMLProperty(object:Dynamic, property:Access):ErrorCodeApplies a property XML node to an object.
Parameters:
object | Object to which the xml property will be applied |
|---|---|
property |
|
staticcreateSpriteFromXML(node:Access, parentFolder:String = "", defaultAnimType:XMLAnimType = BEAT, ?cl:Class<FunkinSprite>):FunkinSpriteCreates a new sprite based on a XML node.
staticbannedNames:Array<String> = [".git", ".gitignore", ".github", ".vscode", ".gitattributes", "readme.txt"]staticarrayToList(array:Array<Entry>):List<Entry>[Description] Converts an Array<Entry> to a List<Entry>.
Parameters:
array |
|---|
Returns:
List
staticcreateZipFile(path:String):ZipWriter[Description] Creates a ZIP file at the specified location and returns the Writer.
Parameters:
path |
|---|
Returns:
Writer
staticopenZip(zipPath:String):Reader[Description] Returns a zip.Reader instance from path.
Parameters:
zipPath |
|---|
Returns:
Reader
staticuncompressZip(zip:Reader, destFolder:String, ?prefix:String, ?prog:ZipProgress):ZipProgress[Description] Uncompresses zip into the destFolder folder
Parameters:
zip | |
|---|---|
null | destFolder |
staticuncompressZipAsync(zip:Reader, destFolder:String, ?prog:ZipProgress, ?prefix:String):ZipProgressstaticunzip(f:Entry):Null<Bytes>[Description] Copy of haxe's Zip unzip function cause lime replaced it.
Parameters:
f | Zip entry |
|---|
staticwriteFolderToZip(zip:ZipWriter, path:String, ?prefix:String, ?prog:ZipProgress, ?whitelist:Array<String>):ZipProgress[Description] Writes the entirety of a folder to a zip file.
Parameters:
zip | ZIP file to write to |
|---|---|
path | Folder path |
prefix | (Additional) allows you to set a prefix in the zip itself. |
| .. | |
|---|---|
| native | |
| AnimData | |
| BitmapUtil | |
| ConsoleColor | |
| CoolSfx | SFXs to play using |
| CoolUtil | |
| DiscordJson | |
| DiscordUtil | |
| EngineUtil | |
| FlxInterpolateColor | Additional class for FlxColor lerping.
-Gets rid of precision issues with |
| FunkinParentDisabler | FlxBasic allowing you to disable those elements from the parent state while this substate is opened -- Tweens -- Camera Movement -- Timers -- Sounds |
| IXMLEvents | |
| IniUtil | DOESNT SUPPORT CATEGORIES YET!! |
| MarkdownUtil | |
| MemoryUtil | |
| MessageBoxIcon | |
| NativeAPI | Class for Windows-only functions, such as transparent windows, message boxes, and more. -Does not have any effect on other platforms. |
| ShaderResizeFix | |
| SortedArrayUtil | All types of utils only usable in a sorted array. |
| StrNameLabel | |
| SysZip | Class that extends Reader allowing you to load ZIP entries without blowing your RAM up!! -Half of the code is taken from haxe libraries btw |
| SysZipEntry | |
| XMLUtil | Class made to make XML parsing easier. |
| ZipProgress | |
| ZipReader | |
| ZipUtil | |
| ZipWriter | |
| .. | |
|---|---|
| HiddenProcess | |
| Stdin | |
| Stdout |
options:Array<Editor> = [{ name : "Chart Editor", iconID : 0, state : funkin.editors.charter.CharterSelection }, { name : "Character Editor", iconID : 1, state : funkin.editors.character.CharacterSelection }, { name : "Stage Editor", iconID : 2, state : null }, { name : "UI Debug State", iconID : 3, state : UIDebugState }, { name : "Debug Options", iconID : 4, state : DebugOptions }]createNewButton(anim:String, offset:FlxPoint, ghost:Bool = false, id:Int = -1, updatePos:Bool = true):VoidCEditInfo(oldInfo:Xml, newInfo:Xml)CCreateAnim(animID:Int, animData:AnimData)CDeleteAnim(animID:Int, animData:AnimData)CChangeOffset(name:String, change:FlxPoint)CResetOffsets(oldOffsets:Map<String, FlxPoint>)CPlaceNote(note:CharterNote)CSustainChange(notes:Array<NoteSustainChange>)CCreateNotes(notes:Array<CharterNote>)CDeleteNotes(notes:Array<CharterNote>)CNoteDrag(notes:Array<NoteDragChange>, deletes:Array<CharterNote>)CCreateStrumLine(strumLineID:Int, strumLine:ChartStrumLine)CDeleteStrumLine(strumLineID:Int, strumLine:ChartStrumLine)staticdefaultEventsList:Array<String> = ["HScript Call", "Camera Movement", "BPM Change", "Alt Animation Toggle"]staticdefaultEventsParams:Map<String, Array<EventParamInfo>> = ["HScript Call" => [{ name : "Function Name", type : TString, defValue : "myFunc" }, { name : "Function Parameters (String split with commas)", type : TString, defValue : "" }], "Camera Movement" => [{ name : "Camera Target", type : TStrumLine, defValue : 0 }], "BPM Change" => [{ name : "Target BPM", type : TFloat(1), defValue : 100 }], "Alt Animation Toggle" => [{ name : "Strumline", type : TStrumLine, defValue : 0 }, { name : "Enable", type : TBool, defValue : true }]](funkin.editors.ui.UIContextMenu, Int, funkin.editors.ui.UIContextMenuOption) ‑> Voidnew(x:Float, y:Float, value:Float = 0, step:Float = 1, precision:Int = 0, ?min:Float, ?max:Float, w:Int = 180, h:Int = 32)openContextMenu(options:Array<UIContextMenuOption>, ?callback:Null<UIContextMenuCallback>, ?x:Float, ?y:Float):UIContextMenustaticprocessShortcuts(topMenuOptions:Array<UIContextMenuOption>):BoolProcess all options with shortcuts present in a Array<UIContextMenuOption>. Also checks childrens.
Parameters:
null | topMenuOptions |
|---|
danceOnBeat:Bool = trueWhenever the character should dance on beat or not. Set to false for gf, since the dance animation is automatically handled by PlayState.
playSingAnim(direction:Int, suffix:String = "", Context:PlayAnimContext = SING, Force:Bool = true, Reversed:Bool = false, Frame:Int = 0):Voidnew(x:Float, y:Float, character:String = "bf-dead", player:Bool = true, gameOverSong:String = "gameOver", lossSFX:String = "gameOverSFX", retrySFX:String = "gameOverEnd")healthSteps:Map<Int, Int> = [0 => 1, 20 => 0]Health steps in this format: -Min Percentage => Frame Index
setHealthSteps(steps:Array<Array<Int>>):VoidHelper for HScript who can't make maps
Parameters:
steps | Something like this: |
|---|
strumRelativePos:Bool = trueWhenever the position of the note should be relative to the strum position or not. -For example, if this is true, a note at the position 0; 0 will be on the strum, instead of at the top left of the screen.
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):VoidLoads 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. |
accFormat:FlxTextFormat = new FlxTextFormat(0xFF888888, false, false, 0)Format for the accuracy rating.
camZoomingInterval:Int = 4Interval of cam zooming (beats). -For example: if set to 4, the camera will zoom every 4 beats.
comboBreaks:Bool = !Options.ghostTappingWhenever 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.hitWindowHit 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 = isStoryModeWhenever 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 = 0Current 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.
gameOver(?character:Character, ?deathCharID:String, ?gameOverSong:String, ?lossSFX:String, ?retrySFX:String):VoidForces 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 |
noteMiss(strumLine:StrumLine, note:Note, ?direction:Int, ?player:Int):VoidMisses 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):VoidStarts a cutscene.
Parameters:
prefix | Custom prefix. Using |
|---|---|
cutsceneScriptPath | Optional: Custom script path. |
callback | Callback called after the cutscene ended. If equals to |
dynamicupdateDiscordPresence():VoidFunction used to update Discord Presence.
-This function is dynamic, which means you can do updateDiscordPresence = function() {} in scripts.
animationNames:Array<Array<String>> = []Animation names sorted by strum IDs.
-Use getSplashAnim to get one.
getSplashGroup(name:String):Null<SplashGroup>Returns a group of splashes, and creates it if it doesn't exist.
Parameters:
path | Path to the splashes XML ( |
|---|
notes:NoteGroupGroup of all of the notes in this strumline. Using forEach on this group will only loop through the first notes for performance reasons.
onHit:FlxTypedSignal<NoteHitEvent ‑> Void> = new FlxTypedSignal<NoteHitEvent>()Signal that triggers whenever a note is hit. Similar to onPlayerHit and onDadHit, except strumline specific.
-To add a listener, do
-strumLine.onHit.add(function(e:NoteHitEvent) {});
onMiss:FlxTypedSignal<NoteMissEvent ‑> Void> = new FlxTypedSignal<NoteMissEvent>()Signal that triggers whenever a note is missed. Similar to onPlayerMiss, except strumline specific.
-To add a listener, do
-strumLine.onMiss.add(function(e:NoteMissEvent) {});
onNoteDelete:FlxTypedSignal<SimpleNoteEvent ‑> Void> = new FlxTypedSignal<SimpleNoteEvent>()Signal that triggers whenever a note is being updated. Similar to onNoteUpdate, except strumline specific.
-To add a listener, do
-strumLine.onNoteUpdate.add(function(e:NoteUpdateEvent) {});
onNoteUpdate:FlxTypedSignal<NoteUpdateEvent ‑> Void> = new FlxTypedSignal<NoteUpdateEvent>()Signal that triggers whenever a note is being updated. Similar to onNoteUpdate, except strumline specific.
-To add a listener, do
-strumLine.onNoteUpdate.add(function(e:NoteUpdateEvent) {});
strumAnimPrefix:Array<String> = ["left", "down", "up", "right"]TODO: Write documention about this being a variable that can help when making multi key
createStrum(i:Int, ?animPrefix:String):StrumCreates a strum and returns the created strum (needs to be added manually).
Parameters:
i | Index of the strum |
|---|---|
animPrefix | (Optional) Animation prefix ( |
Substate made for cutscenes.
Substate made for dialogue cutscenes. To use it in a scripted cutscene, call startDialogue.
Substate made for scripted cutscenes.
-To add cutscenes to your songs, add a cutscene.hx file in your song's directory (ex: songs/song/cutscene.hx)
Substate made for video cutscenes. To use it in a scripted cutscene, call startVideo.
| .. | |
|---|---|
| CharPosDef | |
| DialogueBox | |
| DialogueCharTweenContext | |
| DialogueCharacter |
| .. | |
|---|---|
| dialogue | |
| Cutscene | Substate made for cutscenes. |
| CutsceneSubtitle | |
| DialogueCutscene | Substate made for dialogue cutscenes. To use it in a scripted cutscene, call |
| DialogueLine | |
| ScriptedCutscene | Substate made for scripted cutscenes.
-To add cutscenes to your songs, add a |
| VideoCutscene | Substate made for video cutscenes. To use it in a scripted cutscene, call |
autoplayElapsed:Float = 0Time elapsed since last autoplay. If this time exceeds timeUntilAutoplay, the currently selected song will play.
coopLabels:Array<String> = ["[TAB] Solo", "[TAB] Opponent Mode", "[TAB] Co-Op Mode", "[TAB] Co-Op Mode (Switched)"]Array containing all labels for Co-Op / Opponent modes.
interpColor:FlxInterpolateColorFlxInterpolateColor object for smooth transition between Freeplay colors.
changeCoopMode(change:Int = 0, force:Bool = false):VoidChange the current coop mode context.
Parameters:
change | How much to change |
|---|---|
force | Force the change, even if |
changeDiff(change:Int = 0, force:Bool = false):VoidChanges the current difficulty
Parameters:
change | How much to change. |
|---|---|
force | Force the change if |
changeSelection(change:Int = 0, force:Bool = false):VoidChange the current selection.
Parameters:
change | How much to change |
|---|---|
force | Force the change, even if |
titleLines:Map<Int, IntroText> = [1 => new IntroText(["ninjamuffin99", "phantomArcade", "kawaisprite", "evilsk8er"]), 3 => new IntroText(["ninjamuffin99", "phantomArcade", "kawaisprite", "evilsk8er", "present"]), 4 => new IntroText(), 5 => new IntroText(["In association", "with"]), 7 => new IntroText(["In association", "with", "newgrounds", { name : "newgroundsLogo", path : "menus/titlescreen/newgrounds_logo", scale : 0.8 }]), 8 => new IntroText(), 9 => new IntroText(["{introText1}"]), 11 => new IntroText(["{introText1}", "{introText2}"]), 12 => new IntroText(), 13 => new IntroText(["Friday"]), 14 => new IntroText(["Friday", "Night"]), 15 => new IntroText(["Friday", "Night", "Funkin'"])]| .. | |
|---|---|
| CreditsCodename | |
| CreditsMain |
Loosely based on FlxTypeText lolol
| .. | |
|---|---|
| AlphaCharacter | |
| Alphabet | Loosely based on FlxTypeText lolol |
staticmainOptions:Array<OptionCategory> = [{ name : "Controls", desc : "Change Controls for Player 1 and Player 2!", state : null, substate : funkin.options.keybinds.KeybindsOptions }, { name : "Gameplay >", desc : "Change Gameplay options such as Downscroll, Scroll Speed, Naughtyness...", state : GameplayOptions }, { name : "Appearance >", desc : "Change Appearance options such as Flashing menus...", state : AppearanceOptions }, { name : "Miscellaneous >", desc : "Use this menu to reset save data or engine settings.", state : MiscOptions }]staticfinalread onlyonAvatarAdd:FlxTypedSignal<PlayerSettings ‑> Void> = new FlxTypedSignal<PlayerSettings>()staticfinalread onlyonAvatarRemove:FlxTypedSignal<PlayerSettings ‑> Void> = new FlxTypedSignal<PlayerSettings>()| .. | |
|---|---|
| AppearanceOptions | |
| GameplayOptions | |
| MiscOptions |
categories:Array<{settings:Array<{name:String, control:String}>, name:String}> = [{ name : "Notes", settings : [{ name : "{noteLeft}", control : "NOTE_LEFT" }, { name : "{noteDown}", control : "NOTE_DOWN" }, { name : "{noteUp}", control : "NOTE_UP" }, { name : "{noteRight}", control : "NOTE_RIGHT" }] }, { name : "UI", settings : [{ name : "Left", control : "LEFT" }, { name : "Down", control : "DOWN" }, { name : "Up", control : "UP" }, { name : "Right", control : "RIGHT" }, { name : "Accept", control : "ACCEPT" }, { name : "Back", control : "BACK" }, { name : "Reset", control : "RESET" }, { name : "Pause", control : "PAUSE" }] }, { name : "Engine", settings : [{ name : "Switch Mod", control : "SWITCHMOD" }] }]| .. | |
|---|---|
| ChangeKeybindSubState | |
| KeybindSetting | |
| KeybindsOptions |
new(text:String, desc:String, min:Float, max:Float, changeVal:Float, optionName:String, ?selectCallback:Float ‑> Void, ?parent:Dynamic)| .. | |
|---|---|
| Checkbox | |
| IconOption | |
| NumOption | |
| OptionType | |
| PortraitOption | |
| TextOption |
Class used for saves WITHOUT going through the struggle of type checks
-Just add your save variables the way you would do in the Options.hx file.
-The macro will automatically generate the flush and load functions.
staticinlinegetSongHighscore(name:String, diff:String, ?changes:Array<HighscoreChange>):SongScoreReturns the high-score for a song.
Parameters:
name | Song name |
|---|---|
diff | Song difficulty |
changes | Changes made to that song in freeplay. |
staticinlinesetSongHighscore(name:String, diff:String, highscore:SongScore, ?changes:Array<HighscoreChange>):BoolHWeekEntry(weekName:String, difficulty:String)HSongEntry(songName:String, difficulty:String, changes:Array<HighscoreChange>)| .. | |
|---|---|
| FunkinSave | Class used for saves WITHOUT going through the struggle of type checks
-Just add your save variables the way you would do in the Options.hx file.
-The macro will automatically generate the |
| HighscoreChange | |
| HighscoreEntry | |
| SongScore |
| t |
width | Width of the game |
|---|---|
height | Height of the game |
postUpdate(elapsed:Float):VoidCalled after the game has been updated.
-Aliases: postUpdate
Parameters:
elapsed | Time elapsed since last frame |
|---|
Contains all callbacks you can add in modcharts and stage scripts.
-NOTE: In case you're scripting a stage, all sprites of that stage are directly accessible via their name.
-Ex: If you added a superCoolBG element in your stage XML, you'll be able to access it via scripts by using superCoolBG.
inputPostUpdate(event:InputSystemEvent):VoidTriggered after the input system updates.
Parameters:
note | Event object with the pressed, justPressed and justReleased notes. |
|---|
inputUpdate(event:InputSystemEvent):VoidTriggered whenever the input system updates.
Parameters:
note | Event object with the pressed notes, which allows you to alter which notes are being pressed during this frame, or simply cancel the input update. |
|---|
onDadHit(event:NoteHitEvent):VoidTriggered whenever the opponent hits a note.
Parameters:
note | Event object with the note being pressed, the character who pressed it, and functions to alter or cancel the default behaviour. |
|---|
onNoteCreation(event:NoteCreationEvent):VoidTriggered on each note creation
Parameters:
event | Event object containing information about the note. |
|---|
onPlayerHit(event:NoteHitEvent):VoidTriggered whenever the player hits a note.
Parameters:
note | Event object with the note being pressed, the character who pressed it, and functions to alter or cancel the default behaviour. |
|---|
onPostCountdown(event:CountdownEvent):VoidTriggered after every countdown.
Parameters:
event | Countdown event. |
|---|
onStrumCreation(event:StrumCreationEvent):VoidTriggered on each strum creation
Parameters:
event | Event object containing information about the strum. |
|---|
onSubstateClose(event:StateEvent):VoidTriggered on substate close.
Parameters:
event | Event object containing the substate, which is cancellable. |
|---|
onSubstateOpen(event:StateEvent):VoidTriggered on substate open.
Parameters:
event | Event object containing the substate, which is cancellable. |
|---|
postUpdate(elapsed:Float):VoidTriggered at the end of every frame.
Parameters:
elapsed | Time elapsed since last frame. |
|---|
| .. | |
|---|---|
| CharacterScript | Contains all callbacks you can add in a Character script. |
| GlobalScript | A global script is a special kind of script that runs on everywhere on your mod: menus, game, etc... |
| PlayStateScript | Contains all callbacks you can add in modcharts and stage scripts. |