Skip to content

Commit 2aa84c1

Browse files
:meVoid:
1 parent 5547887 commit 2aa84c1

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

assets/data.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"developerMode": true,
3+
"scriptsHotReloading": true
4+
}

source/core/config/MainState.hx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ class MainState extends ALEState
1212

1313
public static function preResetConfig()
1414
{
15-
15+
CoolUtil.destroy();
1616
}
1717

1818
public static function postResetConfig()
1919
{
20+
CoolUtil.init();
21+
22+
FlxSprite.defaultAntialiasing = ClientPrefs.data.antialiasing;
23+
2024
Conductor.init();
2125

2226
Paths.init();

source/utils/CoolUtil.hx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,16 @@ import core.config.ALESave;
1919
class CoolUtil
2020
{
2121
public static var save:ALESave;
22+
23+
public static function init()
24+
{
25+
save = new ALESave();
26+
27+
save.load();
28+
}
29+
30+
public static function destroy()
31+
{
32+
save?.destroy();
33+
}
2234
}

0 commit comments

Comments
 (0)