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