diff options
Diffstat (limited to 'scripts/Map/Map.cs')
| -rw-r--r-- | scripts/Map/Map.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/Map/Map.cs b/scripts/Map/Map.cs index 8521797..04ccabd 100644 --- a/scripts/Map/Map.cs +++ b/scripts/Map/Map.cs @@ -1,3 +1,4 @@ +using System.Net.Http.Headers; using Godot; using TheLegendOfGustav.Entities; using TheLegendOfGustav.Entities.Actors; @@ -95,4 +96,21 @@ public partial class Map : Node2D { entitiesNode.AddChild(entity); } + + public bool LoadGame(Player player) + { + + MapData = new(0, 0, player); + + if (!MapData.LoadGame()) + { + return false; + } + + PlaceTiles(); + PlaceEntities(); + + MapData.EntityPlaced += OnEntityPlaced; + return true; + } } |
