initial config loading system, shadows cvar, assetmanager

This commit is contained in:
2022-06-12 18:49:19 +03:00
parent 81d754c865
commit ba1688ebbf
18 changed files with 168 additions and 38 deletions

View File

@@ -0,0 +1,20 @@
using System.IO;
using FlaxEngine;
namespace Game
{
public static class AssetManager
{
public static string ContentPath { get; private set; } =
Path.Combine(Directory.GetCurrentDirectory(), "Content");
public static GameplayGlobals Globals { get; private set; }
public static Config Config { get; private set; }
public static void Init()
{
Globals = Content.Load<GameplayGlobals>(Path.Combine(ContentPath, "Settings", "GameSettings", "GameplayGlobals.flax"));
Config = ConfigParser.ParseFile(Path.Combine(ContentPath, "config.cfg"));
}
}
}