Game.ContentRoot

This commit is contained in:
Matt Thorson 2020-05-17 19:45:26 -07:00
parent f9455366f0
commit 6a278dc810

View File

@ -20,6 +20,7 @@ namespace Strawberry
public readonly int Width;
public readonly int Height;
public readonly int WindowScale;
public readonly String ContentRoot;
private Scene scene;
private Scene switchToScene;
@ -44,9 +45,14 @@ namespace Strawberry
Width = width;
Height = height;
WindowScale = windowScale;
screenRect = SDL.Rect(0, 0, width * windowScale, height * windowScale);
#if DEBUG
ContentRoot = "../../../src/Content/";
#else
ContentRoot = "Content/";
#endif
String exePath = scope .();
Environment.GetExecutableFilePath(exePath);
String exeDir = scope .();