From f4ed469fc9eaeebf39093fbf6601581cc10c6e2f Mon Sep 17 00:00:00 2001 From: Matheus Date: Sun, 26 Oct 2025 20:02:15 -0300 Subject: feat:save AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O vazio dentro de mim é como uma xícara de café esquecida no canto da mesa. --- scripts/Map/Map.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'scripts/Map/Map.cs') 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; + } } -- cgit v1.2.3