Exemplo n.º 1
0
        protected override object ReadObject <T>(ES3Reader reader)
        {
            var instance = new Devdog.QuestSystemPro.QuestSerializationModel();

            ReadObject <T>(reader, instance);
            return(instance);
        }
    public override void Write(object obj, ES2Writer writer)
    {
        Devdog.QuestSystemPro.QuestSerializationModel data = (Devdog.QuestSystemPro.QuestSerializationModel)obj;

        // Add your writer.Write calls here.
        writer.Write(data.ID);
        writer.Write(data.repeatedTimes);
        writer.Write(data.status);
        writer.Write(data.tasks);
    }
    public override void Read(ES2Reader reader, object c)
    {
        Devdog.QuestSystemPro.QuestSerializationModel data = (Devdog.QuestSystemPro.QuestSerializationModel)c;

        // Add your reader.Read calls here to read the data into the object.
        data.ID            = reader.Read <System.Int32>();
        data.repeatedTimes = reader.Read <System.Int32>();
        data.status        = reader.Read <Devdog.QuestSystemPro.QuestStatus>();
        data.tasks         = reader.ReadArray <Devdog.QuestSystemPro.TaskSerializationModel>();
    }
 public override object Read(ES2Reader reader)
 {
     Devdog.QuestSystemPro.QuestSerializationModel data = new Devdog.QuestSystemPro.QuestSerializationModel();
     Read(reader, data);
     return(data);
 }