initial config loading system, shadows cvar, assetmanager
This commit is contained in:
20
Source/Game/Utility/AssetManager.cs
Normal file
20
Source/Game/Utility/AssetManager.cs
Normal 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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user