void Awake() { if (_instance == null) { _instance = this; this.requestList = new List <CriFsRequest>(); /* 高速化のため、ダミーを追加してListの内部配列の自動確保を促す * 追加による自動確保が目的なのでダミーはすぐに削除する */ CriFsRequest dummy = new CriFsRequest(); this.requestList.Add(dummy); this.requestList.RemoveAt(0); } else { GameObject.Destroy(this); } }
void Update() { #pragma warning disable 162 if (CriWare.supportsCriFsInstaller == true) { CriFsInstaller.ExecuteMain(); if (CriFsWebInstaller.isInitialized) { CriFsWebInstaller.ExecuteMain(); } } #pragma warning restore 162 for (int i = 0; i < this.requestList.Count; i++) { CriFsRequest request = this.requestList[i]; request.Update(); } this.requestList.RemoveAll((CriFsRequest request) => { return(request.isDone || request.isDisposed); }); }
public CriFsInstallRequest(CriFsBinder srcBinder, string srcPath, string dstPath, CriFsRequest.DoneDelegate doneDelegate, int installBufferSize) { this.sourcePath = srcPath; this.destinationPath = dstPath; this.doneDelegate = doneDelegate; this.progress = 0.0f; this.installer = new CriFsInstaller(); this.installer.Copy(srcBinder, srcPath, dstPath, installBufferSize); }
public static CriFsLoadFileRequest LoadFile(string path, CriFsRequest.DoneDelegate doneDelegate, int readUnitSize = DefaultReadUnitSize) { return CriFsServer.instance.LoadFile(null, path, doneDelegate, readUnitSize); }
public static CriFsInstallRequest Install(CriFsBinder srcBinder, string srcPath, string dstPath, CriFsRequest.DoneDelegate doneDeleagate) { return CriFsServer.instance.Install(srcBinder, srcPath, dstPath, doneDeleagate); }
public static CriFsInstallRequest Install(string srcPath, string dstPath, CriFsRequest.DoneDelegate doneDeleagate) { return CriFsUtility.Install(null, srcPath, dstPath, doneDeleagate); }
public CriFsLoadFileRequest(CriFsBinder srcBinder, string path, CriFsRequest.DoneDelegate doneDelegate, int readUnitSize) { /* パスの保存 */ this.path = path; /* 完了コールバック指定 */ this.doneDelegate = doneDelegate; /* readUnitSizeの保存 */ this.readUnitSize = readUnitSize; /* ファイルのバインド要求 */ if (srcBinder == null) { this.newBinder = new CriFsBinder(); this.refBinder = this.newBinder; this.bindId = this.newBinder.BindFile(srcBinder, path); this.phase = Phase.Bind; } else { this.newBinder = null; this.refBinder = srcBinder; this.fileSize = srcBinder.GetFileSize(path); if (this.fileSize < 0) { this.phase = Phase.Error; } else { this.phase = Phase.Load; } } }
public CriFsInstallRequest Install(CriFsBinder srcBinder, string srcPath, string dstPath, CriFsRequest.DoneDelegate doneDelegate) { var request = new CriFsInstallRequest(srcBinder, srcPath, dstPath, doneDelegate, this.installBufferSize); this.requestList.Add(request); return request; }
public void AddRequest(CriFsRequest request) { this.requestList.Add(request); }
void Awake() { if (_instance == null) { _instance = this; this.requestList = new List<CriFsRequest>(); /* 高速化のため、ダミーを追加してListの内部配列の自動確保を促す * 追加による自動確保が目的なのでダミーはすぐに削除する */ CriFsRequest dummy = new CriFsRequest(); this.requestList.Add(dummy); this.requestList.RemoveAt(0); } else { GameObject.Destroy(this); } }
public CriFsLoadFileRequest LoadFile(CriFsBinder binder, string path, CriFsRequest.DoneDelegate doneDelegate, int readUnitSize) { var request = new CriFsLoadFileRequest(binder, path, doneDelegate, readUnitSize); this.AddRequest(request); return request; }
public void AddRequest(CriFsRequest request) { this.requestList.Add(request); }