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); }
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; }
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); }
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); }