RemoveQuads
Introduction
Code Example
List<int> toRemove = new List<int>();
toRemove.Add(0);
toRemove.Add(1);
toRemove.Add(2);
// assuming MyLevel is a valid LayeredTileMap:
MyLevel.MapLayers[0].RemoveQuads(toRemove);Code Example - Removing Quads With the Cursor
var cursor = GuiManager.Cursor;
if(cursor.PrimaryPush)
{
var quadIndex = MapLayer.GetQuadIndex(cursor.WorldX, cursor.WorldY);
if(quadIndex != null)
{
// RemoveQuads takes an IEnumerable so that multiple quads can be removed at once
List quads = new List(){quadIndex.Value};
MapLayer.RemoveQuads(quads);
}
}Last updated
Was this helpful?