Merge branch 'main' of https://github.com/YoshiCrafter29/CodenameEngine
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Friday Night Funkin' - Codename Engine (WIP)
|
||||
|
||||
## PLEASE NOTE - THIS IS STILL IN AN ALPHA STATE
|
||||
## PLEASE NOTE - THIS IS STILL IN A BETA STATE
|
||||
|
||||
Early alpha of Codename Engine, known issues:
|
||||
- Some options are missing
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1812
|
||||
1799
|
||||
|
||||
@@ -524,9 +524,8 @@ class PlayState extends MusicBeatState
|
||||
Paths.getFolderContent('data/charts/', false, true, !fromMods)]) {
|
||||
for(file in content) {
|
||||
var ext = Path.extension(file).toLowerCase();
|
||||
if (Script.scriptExtensions.contains(ext)) {
|
||||
if (Script.scriptExtensions.contains(ext))
|
||||
scripts.add(Script.create(file));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ class Conductor
|
||||
var lastPos = lastSongPos;
|
||||
if (lastSongPos != (lastSongPos = FlxG.sound.music.time)) {
|
||||
// update conductor
|
||||
var timeUntilUpdate = -(lastSongPosTime - (lastSongPosTime = Lib.getTimer()));
|
||||
var timeUntilUpdate = -(lastSongPosTime - (lastSongPosTime = Main.time));
|
||||
var elapsedAL = (lastSongPos - lastPos);
|
||||
speed = FlxMath.bound(FlxMath.lerp(speed, timeUntilUpdate / elapsedAL, timeUntilUpdate / 1000), 0.85, 1.15);
|
||||
songPosition = lastSongPos;
|
||||
|
||||
@@ -12,7 +12,7 @@ import funkin.options.Options;
|
||||
import flixel.FlxGame;
|
||||
import flixel.FlxState;
|
||||
import openfl.Assets;
|
||||
import openfl.Lib;
|
||||
import flash.Lib;
|
||||
import openfl.display.FPS;
|
||||
import openfl.display.Sprite;
|
||||
import openfl.events.Event;
|
||||
@@ -47,6 +47,8 @@ class Main extends Sprite
|
||||
var skipSplash:Bool = true; // Whether to skip the flixel splash screen that appears in release mode.
|
||||
var startFullscreen:Bool = false; // Whether to start the game in fullscreen on desktop targets
|
||||
|
||||
public static var time:Int = 0;
|
||||
|
||||
// You can pretty much ignore everything from here on - your code should go in your states.
|
||||
|
||||
#if sys
|
||||
@@ -126,7 +128,13 @@ class Main extends Sprite
|
||||
#end
|
||||
}
|
||||
|
||||
private static function getTimer():Int {
|
||||
return time = Lib.getTimer();
|
||||
}
|
||||
|
||||
public function loadGameSettings() {
|
||||
@:privateAccess
|
||||
FlxG.game.getTimer = getTimer;
|
||||
#if sys
|
||||
for(i in 0...4)
|
||||
gameThreads.push(Thread.createWithEventLoop(function() {Thread.current().events.promise();}));
|
||||
|
||||
Reference in New Issue
Block a user