public void Insert(int index, TileSwitch value) { if (index < TileSwitches.Count) { TileSwitches.Insert(index, value); } else { TileSwitches.Add(value); } }
public void Insert(int index, Point p) { var e = new TileSwitch(); e.X = (byte)p.X; e.Y = (byte)p.Y; if (index < TileSwitches.Count) { TileSwitches.Insert(index, e); } else { TileSwitches.Add(e); } }
public void Insert(int index, Point p, Area area, Tileset tileset) { TileSwitch tileSwitch = new TileSwitch(); tileSwitch.X = (byte)p.X; tileSwitch.Y = (byte)p.Y; tileSwitch.TilemapA = new AreaTilemap(area, tileset, tileSwitch, false); if (index < TileSwitches.Count) { TileSwitches.Insert(index, tileSwitch); } else { TileSwitches.Add(tileSwitch); } }