Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
22 additions
and
19 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,37 @@ | ||
package; | ||
|
||
import escape.PlayState; | ||
import escape.MenuState; | ||
|
||
import flixel.FlxG; | ||
import flixel.FlxGame; | ||
import flixel.FlxState; | ||
import openfl.display.Sprite; | ||
|
||
class Main extends Sprite { | ||
public static var env: String; | ||
|
||
static inline var TEST = "TEST"; | ||
|
||
public function new() { | ||
getEnv(); | ||
|
||
super(); | ||
|
||
if (env == TEST) FlxG.debugger.drawDebug = true; | ||
|
||
addChild(new FlxGame(0, 0, MenuState, 1, 60, 60, true, false)); | ||
} | ||
|
||
|
||
public static function getEnv(): String { | ||
if (env != null) return env; | ||
|
||
#if web | ||
var env = ""; | ||
env = ""; | ||
#else | ||
var env = Sys.getEnv("ENV"); | ||
env = Sys.getEnv("ENV"); | ||
#end | ||
env = env != null ? env.toUpperCase() : env; | ||
|
||
var state: Class<FlxState> = MenuState; | ||
|
||
if (env == TEST) FlxG.debugger.drawDebug = true; | ||
|
||
addChild(new FlxGame(0, 0, state, 1, 60, 60, true, false)); | ||
return env; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters