public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 0: { int pic_number = reader.ReadInt(); for (int i = 0; i < pic_number; i++) { Picture pic = new Picture(PictureTypes.gump, -1, -1, -1, -1, -1); pic.Deserialize(reader); m_Pictures.Add(pic); } m_Title = reader.ReadString(); m_Author = reader.ReadString(); m_Background = reader.ReadInt(); m_Titlepage = reader.ReadBool(); m_Full = reader.ReadBool(); m_BigBook = reader.ReadBool(); m_CustomArt = reader.ReadBool(); m_Pages = new BookPageInfo[reader.ReadInt()]; for (int i = 0; i < m_Pages.Length; ++i) m_Pages[i] = new BookPageInfo(reader); break; } } Weight = BookWeight; }
public void AddPicturePage(PictureTypes type, int page, int hue, int id, int x, int y) { Picture pic = new Picture(type, id, hue, page, x, y); m_Pictures.Add(pic); }