documentation

This commit is contained in:
Yoshman29
2023-02-06 13:08:15 +01:00
parent 376609153b
commit a9df83d905
20 changed files with 154 additions and 323 deletions
+20
View File
@@ -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);
}
}
+1 -1
View File
@@ -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());
+3
View File
@@ -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")
{