Fix replay crashes
This commit is contained in:
parent
ad7cbda055
commit
f444c8d3d1
@ -33,7 +33,7 @@ class LoadReplayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
var menuBG:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menuDesat'));
|
var menuBG:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menuDesat'));
|
||||||
#if sys
|
#if sys
|
||||||
controlsStrings = sys.FileSystem.readDirectory(Sys.getCwd() + "\\assets\\replays\\");
|
controlsStrings = sys.FileSystem.readDirectory(Sys.getCwd() + "/assets/replays/");
|
||||||
#end
|
#end
|
||||||
trace(controlsStrings);
|
trace(controlsStrings);
|
||||||
|
|
||||||
|
@ -85,10 +85,10 @@ class Replay
|
|||||||
public function LoadFromJSON()
|
public function LoadFromJSON()
|
||||||
{
|
{
|
||||||
#if sys
|
#if sys
|
||||||
trace('loading ' + Sys.getCwd() + 'assets\\replays\\' + path + ' replay...');
|
trace('loading ' + Sys.getCwd() + 'assets/replays/' + path + ' replay...');
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var repl:ReplayJSON = cast Json.parse(File.getContent(Sys.getCwd() + "assets\\replays\\" + path));
|
var repl:ReplayJSON = cast Json.parse(File.getContent(Sys.getCwd() + "assets/replays/" + path));
|
||||||
replay = repl;
|
replay = repl;
|
||||||
}
|
}
|
||||||
catch(e)
|
catch(e)
|
||||||
|
@ -52,8 +52,8 @@ class TitleState extends MusicBeatState
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
#if sys
|
#if sys
|
||||||
if (!sys.FileSystem.exists(Sys.getCwd() + "\\assets\\replays"))
|
if (!sys.FileSystem.exists(Sys.getCwd() + "/assets/replays"))
|
||||||
sys.FileSystem.createDirectory(Sys.getCwd() + "\\assets\\replays");
|
sys.FileSystem.createDirectory(Sys.getCwd() + "/assets/replays");
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user