111
This commit is contained in:
31
Assets/GameFramework/Runtime/Patch/PatchEvent.cs
Normal file
31
Assets/GameFramework/Runtime/Patch/PatchEvent.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace Tuan.GameFramework
|
||||
{
|
||||
public static class PatchEvent
|
||||
{
|
||||
public static event Action<string> OnStatusUpdate;
|
||||
public static event Action<float> OnProgressUpdate;
|
||||
public static event Action<string> OnDownloadSizeUpdate;
|
||||
public static event Action OnClosePatchWindow;
|
||||
|
||||
public static void UpdateStatus(string status)
|
||||
{
|
||||
OnStatusUpdate?.Invoke(status);
|
||||
}
|
||||
|
||||
public static void UpdateProgress(float progress)
|
||||
{
|
||||
OnProgressUpdate?.Invoke(progress);
|
||||
}
|
||||
|
||||
public static void UpdateDownloadSize(string sizeText)
|
||||
{
|
||||
OnDownloadSizeUpdate?.Invoke(sizeText);
|
||||
}
|
||||
public static void ClosePatchWindow()
|
||||
{
|
||||
OnClosePatchWindow?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user