Skip to content

Commit

Permalink
oops dis shit wasn't type-safe
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackx2 committed Mar 5, 2025
1 parent 9afbdf7 commit 1153950
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions source/funkin/backend/system/scripts/GlobalScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package funkin.backend.system.scripts;

class GlobalScript
{
public static var instance:GlobalScript = null;
public static var instance(default,null):GlobalScript = null;

public static function init():Void
{
try
{
instance = Type.createInstance(GlobalScript, []);
instance =new GlobalScript();
Logs.prefixedTrace('Successfully initialized', 'GlobalScript', GREEN);
}
catch (error:Dynamic)
Expand Down
3 changes: 2 additions & 1 deletion source/funkin/game/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ class Main extends flixel.FlxGame
* Make a `Main` instance
* i wanna see if dis works.
*/
Type.createInstance(Main, []);
new Main();
//Type.createInstance(Main, []);
}

public function new():Void
Expand Down

0 comments on commit 1153950

Please sign in to comment.