예제 #1
0
        public uint GetSize()
        {
            uint size = 0;

            size += sizeof(ushort);
            for (int i = 0; i < items.Count; ++i)
            {
                DB_TileSet item = items[i];
                size += item.GetSize();
            }
            return(size);
        }
예제 #2
0
 public DB_TileSet(DB_TileSet rho)
 {
     id           = rho.id;
     name         = rho.name;
     tileMaterial = rho.tileMaterial;
     isMove       = rho.isMove;
     groupname    = rho.groupname;
     randomCount  = rho.randomCount;
     isAutoTile   = rho.isAutoTile;
     autoTileType = rho.autoTileType;
     subPath      = rho.subPath;
     spritePack   = rho.spritePack;
     sprites      = rho.sprites;
 }
예제 #3
0
 public bool Encode(BinaryEncoder encoder)
 {
     {
         ushort _size = (ushort)items.Count;
         if (!BinaryCodec.Encode(encoder, _size))
         {
             return(false);
         }
         for (int i = 0; i < items.Count; ++i)
         {
             DB_TileSet item = items[i];
             if (!item.Encode(encoder))
             {
                 return(false);
             }
         }
     }
     return(true);
 }
예제 #4
0
 public bool Decode(BinaryDecoder decoder)
 {
     {
         ushort _size = 0;
         if (!BinaryCodec.Decode(decoder, out _size))
         {
             return(false);
         }
         items.Capacity = _size;
         for (int i = 0; i < _size; ++i)
         {
             DB_TileSet item = new DB_TileSet();
             if (!item.Decode(decoder))
             {
                 return(false);
             }
             items.Add(item);
         }
     }
     return(true);
 }