public IItemMapTile Add(ushort tileid, ushort palette, sbyte altitude)
        {
            var tile = new ItemMapTile(tileid, palette, altitude);

            _Items.Add(tile);
            return(tile);
        }
 public MapBlockData(uint header, IMapTile[] tiles)
 {
     _LandHeader = header;
     _Lands = new LandMapTile[64];
     _Items = new ItemMapTile[64][];
     for (int t = 0; t < 64; ++t) {
         _Lands[t] = tiles[t].Land as LandMapTile;
         _Items[t] = new ItemMapTile[tiles[t].Count];
         for (int i = 0; i < tiles[t].Count; ++i)
             _Items[t][i] = tiles[t][i] as ItemMapTile;
     }
 }
 public MapBlockData(uint header, LandMapTileData[] lands, ItemMapTileData[][] items)
 {
     _LandHeader = header;
     _Lands = new LandMapTile[64];
     _Items = new ItemMapTile[64][];
     for (int i = 0; i < 64; ++i)
     {
         _Lands[i] = new LandMapTile(lands[i].TileId, lands[i].Altitude);
         _Items[i] = new ItemMapTile[items[i].Length];
         for (int k = 0; k < items[i].Length; ++k)
             _Items[i][k] = new ItemMapTile(items[i][k].TileId, items[i][k].Palette, items[i][k].Altitude);
     }
 } 
Exemple #4
0
 public IItemMapTile Add(ushort tileid, ushort palette, sbyte altitude)
 {
     var tile = new ItemMapTile(tileid, palette, altitude);
     _Items.Add(tile);
     return tile;
 }