예제 #1
0
 public void Insert(int index, TileSwitch value)
 {
     if (index < TileSwitches.Count)
     {
         TileSwitches.Insert(index, value);
     }
     else
     {
         TileSwitches.Add(value);
     }
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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);
            }
        }