2024-09-05 16:31:31 +00:00
|
|
|
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; }
|
2024-09-19 20:16:07 +00:00
|
|
|
public ResourcePathManager.CampaignResources CampaignResources { get; private set; }
|
2024-09-05 16:31:31 +00:00
|
|
|
|
|
|
|
public override void _Ready()
|
|
|
|
{
|
|
|
|
var extractPath = ProjectSettings.GlobalizePath($"user://extracted/tmp");
|
|
|
|
PathManager = new ResourcePathManager(extractPath);
|
2024-09-05 17:52:44 +00:00
|
|
|
ModelLoader = new ModelLoader();
|
2024-09-19 20:16:07 +00:00
|
|
|
CampaignResources = PathManager.GetCampaign("");
|
2024-09-05 16:31:31 +00:00
|
|
|
|
|
|
|
Instance = this;
|
|
|
|
}
|
2024-09-19 20:16:07 +00:00
|
|
|
|
|
|
|
public void SetCampaign(string campaignName)
|
|
|
|
{
|
|
|
|
CampaignResources = PathManager.GetCampaign(campaignName);
|
|
|
|
}
|
2024-09-05 16:31:31 +00:00
|
|
|
}
|