示例#1
0
        public TilemapDataT UnPack()
        {
            var _o = new TilemapDataT();

            this.UnPackTo(_o);
            return(_o);
        }
示例#2
0
 public void UnPackTo(TilemapDataT _o)
 {
     _o.MapFlags = this.MapFlags;
     _o.Tiles    = new List <N2S.FileFormat.TileDataT>();
     for (var _j = 0; _j < this.TilesLength; ++_j)
     {
         _o.Tiles.Add(this.Tiles(_j).HasValue ? this.Tiles(_j).Value.UnPack() : null);
     }
 }
示例#3
0
        public static Offset <N2S.FileFormat.TilemapData> Pack(FlatBufferBuilder builder, TilemapDataT _o)
        {
            if (_o == null)
            {
                return(default(Offset <N2S.FileFormat.TilemapData>));
            }
            var _tiles = default(VectorOffset);

            if (_o.Tiles != null)
            {
                var __tiles = new Offset <N2S.FileFormat.TileData> [_o.Tiles.Count];
                for (var _j = 0; _j < __tiles.Length; ++_j)
                {
                    __tiles[_j] = N2S.FileFormat.TileData.Pack(builder, _o.Tiles[_j]);
                }
                _tiles = CreateTilesVector(builder, __tiles);
            }
            return(CreateTilemapData(
                       builder,
                       _o.MapFlags,
                       _tiles));
        }