make resources global classes
parent
6f03295d8e
commit
c1d66f15e0
|
@ -9,6 +9,7 @@ public enum InputMethod
|
||||||
MouseCentered,
|
MouseCentered,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[GlobalClass]
|
||||||
public partial class GameSettings : Resource
|
public partial class GameSettings : Resource
|
||||||
{
|
{
|
||||||
[Export]
|
[Export]
|
||||||
|
|
|
@ -36,13 +36,13 @@ public partial class GlobalState : Node
|
||||||
|
|
||||||
public override void _Notification(int what)
|
public override void _Notification(int what)
|
||||||
{
|
{
|
||||||
if (what == NotificationWMCloseRequest)
|
//if (what == NotificationWMCloseRequest)
|
||||||
{
|
//{
|
||||||
// TODO: quit prompt
|
// // TODO: quit prompt
|
||||||
GetTree().Root
|
// GetTree().Root
|
||||||
.PropagateNotification((int)NotificationWMCloseRequest);
|
// .PropagateNotification((int)NotificationWMCloseRequest);
|
||||||
SaveSettings();
|
// SaveSettings();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadSettings()
|
private void LoadSettings()
|
||||||
|
|
|
@ -3,10 +3,11 @@ using Godot.Collections;
|
||||||
|
|
||||||
namespace SupaLidlGame.State.Global;
|
namespace SupaLidlGame.State.Global;
|
||||||
|
|
||||||
|
[GlobalClass]
|
||||||
public partial class MapState : Resource
|
public partial class MapState : Resource
|
||||||
{
|
{
|
||||||
[Export]
|
[Export]
|
||||||
private Dictionary<string, Variant> _state = new();
|
private Dictionary<string, Variant> _state;
|
||||||
|
|
||||||
[Signal]
|
[Signal]
|
||||||
public delegate void MapStateChangedEventHandler(string key, Variant value);
|
public delegate void MapStateChangedEventHandler(string key, Variant value);
|
||||||
|
|
|
@ -3,6 +3,7 @@ using Godot.Collections;
|
||||||
|
|
||||||
namespace SupaLidlGame.State.Global;
|
namespace SupaLidlGame.State.Global;
|
||||||
|
|
||||||
|
[GlobalClass]
|
||||||
public partial class Progression : Resource
|
public partial class Progression : Resource
|
||||||
{
|
{
|
||||||
public Dictionary<string, bool> BossStatus { get; set; }
|
public Dictionary<string, bool> BossStatus { get; set; }
|
||||||
|
|
|
@ -2,6 +2,7 @@ using Godot;
|
||||||
|
|
||||||
namespace SupaLidlGame.State.Global;
|
namespace SupaLidlGame.State.Global;
|
||||||
|
|
||||||
|
[GlobalClass]
|
||||||
public partial class Stats : Resource
|
public partial class Stats : Resource
|
||||||
{
|
{
|
||||||
[Export]
|
[Export]
|
||||||
|
|
Loading…
Reference in New Issue