From d6fc2026917d55fa12713e3d00004ec461cc5971 Mon Sep 17 00:00:00 2001 From: Matheus Date: Thu, 30 Oct 2025 17:31:00 -0300 Subject: vĂ¡rios andares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/Map/MapData.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts/Map/MapData.cs') diff --git a/scripts/Map/MapData.cs b/scripts/Map/MapData.cs index 5f96743..907e8d0 100644 --- a/scripts/Map/MapData.cs +++ b/scripts/Map/MapData.cs @@ -84,6 +84,10 @@ public partial class MapData : RefCounted, ISaveable return list; } } + + public int CurrentFloor { get; set; } = 0; + + public Vector2I DownstairsLocation { get; set; } /// /// Objeto do Godot que utiliza do algoritmo A* para calcular /// caminhos e rotas. @@ -349,6 +353,9 @@ public partial class MapData : RefCounted, ISaveable {"player", Player.GetSaveData()}, {"width", Width}, {"height", Height}, + {"current_floor", CurrentFloor}, + {"down_stairs_location_x", DownstairsLocation.X}, + {"down_stairs_location_y", DownstairsLocation.Y} }; } @@ -357,6 +364,9 @@ public partial class MapData : RefCounted, ISaveable Width = (int)saveData["width"]; Height = (int)saveData["height"]; + CurrentFloor = (int)saveData["current_floor"]; + DownstairsLocation = new((int)saveData["down_stairs_location_x"], (int)saveData["down_stairs_location_y"]); + SetupTiles(); Array> serializedTiles = (Array>)saveData["tiles"]; -- cgit v1.2.3