diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-10-30 17:31:00 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-10-30 17:31:06 -0300 |
| commit | d6fc2026917d55fa12713e3d00004ec461cc5971 (patch) | |
| tree | 54fc79f9f8a217b2477721e21875e74c1736564e /scripts/Map/MapData.cs | |
| parent | e40bc38dcc17ebeb40722bedb94a6459e47b9aeb (diff) | |
vários andares
Diffstat (limited to 'scripts/Map/MapData.cs')
| -rw-r--r-- | scripts/Map/MapData.cs | 10 |
1 files changed, 10 insertions, 0 deletions
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; } /// <summary> /// 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<Dictionary<string, Variant>> serializedTiles = (Array<Dictionary<string, Variant>>)saveData["tiles"]; |
