documentation
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package funkin.system;
|
||||
|
||||
import flixel.FlxGame;
|
||||
|
||||
class FunkinGame extends FlxGame {
|
||||
var skipNextTickUpdate:Bool = false;
|
||||
public override function switchState() {
|
||||
super.switchState();
|
||||
// draw once to put all images in gpu then put the last update time to now to prevent lag spikes or whatever
|
||||
draw();
|
||||
_total = ticks = getTicks();
|
||||
skipNextTickUpdate = true;
|
||||
}
|
||||
|
||||
public override function onEnterFrame(t) {
|
||||
if (skipNextTickUpdate != (skipNextTickUpdate = false))
|
||||
_total = ticks = getTicks();
|
||||
super.onEnterFrame(t);
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ class Main extends Sprite
|
||||
}
|
||||
|
||||
|
||||
addChild(new FlxGame(gameWidth, gameHeight, null, zoom, framerate, framerate, skipSplash, startFullscreen));
|
||||
addChild(new FunkinGame(gameWidth, gameHeight, null, zoom, framerate, framerate, skipSplash, startFullscreen));
|
||||
loadGameSettings();
|
||||
// FlxG.switchState(new TitleState());
|
||||
FlxG.switchState(new funkin.menus.BetaWarningState());
|
||||
|
||||
@@ -41,6 +41,9 @@ class Paths
|
||||
static public function video(key:String) {
|
||||
return getPath('videos/$key.mp4', BINARY, null);
|
||||
}
|
||||
static public function ndll(key:String) {
|
||||
return getPath('ndlls/$key.ndll', BINARY, null);
|
||||
}
|
||||
|
||||
static public function getLibraryPath(file:String, library = "default")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user