Init
This commit is contained in:
39
Assets/Scripts/Runtime/YooAsset/PatchLogic/PatchManager.cs
Normal file
39
Assets/Scripts/Runtime/YooAsset/PatchLogic/PatchManager.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
|
||||
public class PatchManager : Singleton<PatchManager>
|
||||
{
|
||||
public PatchOperationData PreloadData(EPlayMode PlayMode)
|
||||
{
|
||||
PatchOperationData preload = new PatchOperationData();
|
||||
preload.packageName = "Preload";
|
||||
preload.playMode = PlayMode;
|
||||
preload.autoDownload = true;
|
||||
//preload.downloadError = DefDownloadError;
|
||||
//preload.downloadFinish = DefDownloadFinsh;
|
||||
return preload;
|
||||
}
|
||||
|
||||
public PatchOperationData MainData(EPlayMode PlayMode, DownloaderOperation.DownloadUpdate DownloadUpdate)
|
||||
{
|
||||
PatchOperationData main = new PatchOperationData();
|
||||
main.packageName = "Main";
|
||||
main.playMode = PlayMode;
|
||||
main.autoDownload = GameManager.Inst.isServer?true:false;
|
||||
//main.downloadError = DefDownloadError;
|
||||
main.downloadUpdate = DownloadUpdate;
|
||||
//main.downloadFinish = DefDownloadFinsh;
|
||||
return main;
|
||||
}
|
||||
|
||||
//Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>ص<EFBFBD>
|
||||
//public void DefDownloadError(DownloadErrorData downloadErrorData)
|
||||
//{
|
||||
// MessageBox.Show()
|
||||
// .SetTitle(packageName)
|
||||
// .SetContent(downloadErrorData.ErrorInfo)
|
||||
// .AddButton("<22>˳<EFBFBD>", (box) => { Application.Quit(); });
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user