示例#1
0
        void ReadData <T, V>(BinaryReader reader, ModSaveInfo info) where T : V, IDataRegistryMember where V : PersistedDataSet, new()
        {
            if (!IsCustomModel)
            {
                data = new V();
                data.Load(reader.BaseStream);
            }
            else
            {
                var actorId = reader.ReadInt32();
                data = info.GetRegistryFor <T>().GetDataForID(actorId);

                data.Load(reader.BaseStream);
            }
        }
示例#2
0
 void ReadData <T>(BinaryReader reader) where T : PersistedDataSet, new()
 {
     data = new T();
     data.Load(reader.BaseStream);
 }