2023-07-24 12:40:28 -07:00
|
|
|
using Godot;
|
2023-08-12 15:01:22 -07:00
|
|
|
using SupaLidlGame.Utils;
|
2023-07-24 12:40:28 -07:00
|
|
|
|
|
|
|
namespace SupaLidlGame.State.Global;
|
|
|
|
|
|
|
|
public partial class GlobalState : Node
|
|
|
|
{
|
2023-08-05 23:50:08 -07:00
|
|
|
[Export]
|
|
|
|
public Progression Progression { get; set; } = new();
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public MapState MapState { get; set; } = new();
|
2023-07-25 03:47:31 -07:00
|
|
|
|
2023-08-07 02:38:51 -07:00
|
|
|
[Export]
|
|
|
|
public Stats Stats { get; set; } = new();
|
|
|
|
|
2023-07-25 03:47:31 -07:00
|
|
|
[Signal]
|
|
|
|
public delegate void SummonBossEventHandler(string bossName);
|
2023-08-07 02:38:51 -07:00
|
|
|
|
|
|
|
public void Print(string str) => GD.Print(str);
|
2023-08-12 15:01:22 -07:00
|
|
|
|
|
|
|
public void ImportFromSave(Save save)
|
|
|
|
{
|
|
|
|
Progression = save.Progression;
|
|
|
|
MapState = save.MapState;
|
|
|
|
Stats = save.Stats;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void ExportToSave(Save save)
|
|
|
|
{
|
|
|
|
save.Progression = Progression;
|
|
|
|
save.MapState = MapState;
|
|
|
|
save.Stats = Stats;
|
|
|
|
}
|
2023-07-24 12:40:28 -07:00
|
|
|
}
|