private void OnDataLoadSlotFinish(Int32 slotID, List <SharedDataPreviewSlot> data) { if (ISharedDataSerializer.LastErrno != DataSerializerErrorCode.Success) { ISharedDataLog.LogWarning("LastErrno is NOT success in OnDataLoadSlotFinish(), return as success!"); ISharedDataSerializer.LastErrno = DataSerializerErrorCode.Success; } this.onLoadSlotFinishDelegate(ISharedDataSerializer.LastErrno, slotID, data); }
private void LoadCloudSyncPreviewOnFileExistCallBack(Boolean isExist, SiliconStudio.Social.ResponseData.Status status) { if (isExist) { base.StartCoroutine(SiliconStudio.Social.Cloud_Load(this, new Action <Byte[], SiliconStudio.Social.ResponseData.Status>(this.LoadCloudSyncPreviewOnCloudLoadCallBack))); } else { ISharedDataLog.LogWarning("Cloud data does not exist!. Return success status."); ISharedDataSerializer.LastErrno = DataSerializerErrorCode.CloudFileNotFound; this.onSyncCloudSlotFinishDelegate(ISharedDataSerializer.LastErrno, true, this.loadCloudSyncPreviewLocalPreview, (SharedDataPreviewSlot)null); this.ClearCloudSyncPreviewCache(); } }
public override void LoadSlotPreview(Int32 slotID, ISharedDataStorage.OnLoadSlotFinish onFinishDelegate) { if (this.RawData == null) { ISharedDataLog.LogWarning("SharedDataRawStorage LoadSlotPreview is being called but RawData is null!"); onFinishDelegate(slotID, null); return; } base.CreateDataSchema(); List <SharedDataPreviewSlot> list = new List <SharedDataPreviewSlot>(); this.cStream = new MemoryStream(this.RawData); this.cReader = new BinaryReader(this.cStream); this.cOnFinishDelegate = onFinishDelegate; SlotPreviewReadWriterUtil.Instance.ReadSlotPreview(this.metaData, slotID, this.cStream, this.cReader, this.Encryption, new ISharedDataStorage.OnLoadSlotFinish(this.LoadSlotPreviewDelegate)); }
private void LoadCloudSyncPreviewOnCloudLoadCallBack(Byte[] data, SiliconStudio.Social.ResponseData.Status status) { global::Debug.Log("in LoadCloudSyncPreviewOnCloudLoadCallBack 1 " + status); global::Debug.Log("in LoadCloudSyncPreviewOnCloudLoadCallBack 4"); if (data != null) { this.ValidateCloudSaveData(data, delegate(Boolean isSuccess) { if (isSuccess) { this.RawStorage.RawData = data; this.RawStorage.GetLatestSlotAndSave(delegate(Int32 latestCloudSlotID, Int32 latestCloudSaveID) { if (latestCloudSlotID != -1 && latestCloudSaveID != -1) { this.RawStorage.LoadSlotPreview(latestCloudSlotID, delegate(Int32 slotID, List <SharedDataPreviewSlot> previewData) { this.loadCloudSyncPreviewRemotePreview = previewData[latestCloudSaveID]; this.onSyncCloudSlotFinishDelegate(ISharedDataSerializer.LastErrno, true, this.loadCloudSyncPreviewLocalPreview, this.loadCloudSyncPreviewRemotePreview); this.ClearCloudSyncPreviewCache(); this.RawStorage.RawData = null; }); } else { this.onSyncCloudSlotFinishDelegate(ISharedDataSerializer.LastErrno, true, this.loadCloudSyncPreviewLocalPreview, this.loadCloudSyncPreviewRemotePreview); this.ClearCloudSyncPreviewCache(); } }); } else { ISharedDataSerializer.LastErrno = DataSerializerErrorCode.CloudDataCorruption; ISharedDataLog.LogError("Cloud data is invalid!"); this.onSyncCloudSlotFinishDelegate(ISharedDataSerializer.LastErrno, true, this.loadCloudSyncPreviewLocalPreview, this.loadCloudSyncPreviewRemotePreview); } }); } else { ISharedDataLog.LogWarning("Cloud data is null!"); ISharedDataSerializer.LastErrno = ISharedDataSerializer.ConvertCloudStatusToDataSerializerErrorCode(status); this.onSyncCloudSlotFinishDelegate(ISharedDataSerializer.LastErrno, true, this.loadCloudSyncPreviewLocalPreview, this.loadCloudSyncPreviewRemotePreview); this.ClearCloudSyncPreviewCache(); } }
public override void GetLatestTimestamp(ISharedDataStorage.OnGetLatestSaveTimestamp onFinishDelegate) { if (this.RawData == null) { ISharedDataLog.LogWarning("SharedDataRawStorage GetLatestTimestamp is being called but RawData is null!"); onFinishDelegate(false, 0.0); return; } base.CreateDataSchema(); using (MemoryStream memoryStream = new MemoryStream(this.RawData)) { using (BinaryReader binaryReader = new BinaryReader(memoryStream)) { this.metaData.Read(memoryStream, binaryReader, this.Encryption); } } onFinishDelegate(true, this.metaData.LatestTimestamp); }
public static void WillAutosave() { try { if (FF9Snd.HasJustChangedBetweenWorldAndField) { FF9StateSystem.Sound.auto_save_bgm_id = -1; } else { FF9StateSystem.Sound.auto_save_bgm_id = FF9Snd.GetCurrentMusicId(); } FF9Snd.HasJustChangedBetweenWorldAndField = false; } catch (Exception arg) { ISharedDataLog.LogWarning("GetCurrentMusicId: Exception: " + arg); } }
public override void Load(Int32 slotID, Int32 saveID, ISharedDataStorage.OnLoadFinish onFinishDelegate) { ISharedDataLog.LogWarning("No need implementation"); }
public override void SaveSlotPreview(Int32 slotID, Int32 saveID, ISharedDataStorage.OnSaveSlotFinish onFinishDelegate) { ISharedDataLog.LogWarning("No need implementation"); }
public override void ClearAllData() { ISharedDataLog.LogWarning("No need implementation"); }
public override void SaveRawData(Byte[] rawData, ISharedDataStorage.OnSaveRawDataFinish onFinishDelegate) { ISharedDataLog.LogWarning("No need implementation"); }
public override void LoadRawData(ISharedDataStorage.OnLoadRawDataFinish onFinishDelegate) { ISharedDataLog.LogWarning("No need implementation"); }
public override void HasAutoload(ISharedDataStorage.OnHasAutoloadFinish onFinishDelegate) { ISharedDataLog.LogWarning("No need implementation"); }
public override void Autosave(JSONClass rootNode, ISharedDataStorage.OnAutosaveFinish onFinishDelegate) { ISharedDataLog.LogWarning("No need implementation"); }
public override void Save(Int32 slotID, Int32 saveID, JSONClass rootNode, ISharedDataStorage.OnSaveFinish onFinishDelegate) { ISharedDataLog.LogWarning("No need implementation"); }