thief-mission-viewer/project/code/TMV/Context.cs

28 lines
823 B
C#

using Godot;
using KeepersCompound.LGS;
namespace KeepersCompound.TMV;
public partial class Context : Node
{
public static Context Instance { get; private set; }
public ResourcePathManager PathManager { get; private set; }
public ModelLoader ModelLoader { get; private set; }
public ResourcePathManager.CampaignResources CampaignResources { get; private set; }
public override void _Ready()
{
var extractPath = ProjectSettings.GlobalizePath($"user://extracted/tmp");
PathManager = new ResourcePathManager(extractPath);
ModelLoader = new ModelLoader();
CampaignResources = PathManager.GetCampaign("");
Instance = this;
}
public void SetCampaign(string campaignName)
{
CampaignResources = PathManager.GetCampaign(campaignName);
}
}