Пример #1
0
 void ReadCustomSaveData(IAdvCustomSaveDataIO io)
 {
     if (Buffers.ContainsKey(io.SaveKey))
     {
         BinaryUtil.BinaryRead(Buffers[io.SaveKey], io.OnRead);
     }
 }
Пример #2
0
        void WriteCustomSaveData(IAdvCustomSaveDataIO io)
        {
            if (Buffers.ContainsKey(io.SaveKey))
            {
                Debug.LogError(string.Format("Custom save data[{0}] is already exsits. Please use another key.", io.SaveKey));
                return;
            }

            byte[] buffer = BinaryUtil.BinaryWrite(io.OnWrite);
            Buffers.Add(io.SaveKey, buffer);
        }