extends Node2D var ground: TileMapLayer var walls : TileMapLayer var cells : Array var map_width : int = 40 var map_height : int = 32 func _ready() -> void: print("Level ready") ground = $Ground walls = $Walls Log.pr(ground) cells = CoordUtil.all_cells(Vector2i(-1, -1), Vector2i(map_width + 1, map_height + 1)) Log.pr(cells) ground.clear() ground.set_cells_terrain_connect(cells, 0, 1, false) var perimeter_cells : Array = CoordUtil.perimeter_cells(Vector2i(0, 0), Vector2i(map_width, map_height), false, 2) walls.set_cells_terrain_connect(perimeter_cells, 0, 0, false) # walls.set_cells_terrain_connect(cells, 0, 0, true)