refactor: Consolidate skill component logic into SkillComponentBase and update manager access to singletons.
This commit is contained in:
@@ -14,12 +14,24 @@ public partial class SaveSystem : Node
|
||||
[Export] public string SavePath { get; set; } = "user://savegame.json";
|
||||
[Export] public int Version { get; set; } = 2;
|
||||
|
||||
public static SaveSystem Instance { get; private set; }
|
||||
|
||||
private static readonly JsonSerializerOptions JsonOptions = new()
|
||||
{
|
||||
WriteIndented = true,
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
||||
};
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
if (Instance == this) Instance = null;
|
||||
}
|
||||
|
||||
public void SaveGame()
|
||||
{
|
||||
var store = GameStateStore.Instance;
|
||||
|
||||
Reference in New Issue
Block a user