From efb712cb70ca1d0913bb69456ac2344fbaacad0e Mon Sep 17 00:00:00 2001 From: Matheus Date: Sun, 24 Aug 2025 21:46:00 -0300 Subject: Gerador de masmorras. --- scripts/map/MapData.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'scripts/map/MapData.cs') diff --git a/scripts/map/MapData.cs b/scripts/map/MapData.cs index 25d6e09..c580aa8 100644 --- a/scripts/map/MapData.cs +++ b/scripts/map/MapData.cs @@ -22,24 +22,16 @@ public partial class MapData : RefCounted } private void SetupTiles() { - for (int i = 0; i < Width; i++) + for (int i = 0; i < Height; i++) { - for (int j = 0; j < Height; j++) + for (int j = 0; j < Width; j++) { - Tile tile; - if (i == 0 || j == 0 || i == (Width - 1) || j == (Height - 1)) { - tile = new Tile(new Vector2I(i, j), wallDefinition); - } else { - tile = new Tile(new Vector2I(i, j), floorDefinition); - } - - Tiles.Add(tile); + Tiles.Add(new Tile(new Vector2I(j, i), wallDefinition)); } } } - public void InsertActor(Vector2I pos, Actor actor) { - actor.GridPosition = pos; + public void InsertActor(Actor actor) { Actors.Add(actor); } -- cgit v1.2.3