summaryrefslogtreecommitdiff
path: root/scripts/map/MapData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/map/MapData.cs')
-rw-r--r--scripts/map/MapData.cs16
1 files changed, 4 insertions, 12 deletions
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);
}