Пример #1
0
        public uint GetSize()
        {
            uint size = 0;

            size += sizeof(ushort);
            for (int i = 0; i < chapter1.Count; ++i)
            {
                DB_StoreBoard item = chapter1[i];
                size += item.GetSize();
            }
            return(size);
        }
Пример #2
0
 public DB_StoreBoard(DB_StoreBoard rho)
 {
     scene           = rho.scene;
     index           = rho.index;
     characterName   = rho.characterName;
     text            = rho.text;
     eventid         = rho.eventid;
     nextsceneid     = rho.nextsceneid;
     skip            = rho.skip;
     bg              = rho.bg;
     left_character  = rho.left_character;
     right_character = rho.right_character;
     fontsize        = rho.fontsize;
     fonteffect      = rho.fonteffect;
     bgm             = rho.bgm;
     sound           = rho.sound;
 }
Пример #3
0
 public bool Encode(BinaryEncoder encoder)
 {
     {
         ushort _size = (ushort)chapter1.Count;
         if (!BinaryCodec.Encode(encoder, _size))
         {
             return(false);
         }
         for (int i = 0; i < chapter1.Count; ++i)
         {
             DB_StoreBoard item = chapter1[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);
         }
         chapter1.Capacity = _size;
         for (int i = 0; i < _size; ++i)
         {
             DB_StoreBoard item = new DB_StoreBoard();
             if (!item.Decode(decoder))
             {
                 return(false);
             }
             chapter1.Add(item);
         }
     }
     return(true);
 }