View source
class MusicBeatState
package funkin.backend
extends FlxState
implements IBeatReceiver
extended by ModState, UIState, PlayState, FreeplayState, GitarooPause, MainMenuState, StoryMenuState, TitleState, WarningState
Base class for all the states. Handles the scripts, the transitions, and the beat and step events.
Static variables
Constructor
Variables
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)
Methods
View on GitHub
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. |