111
This commit is contained in:
16
Assets/GameScripts/Preload/GameScripts.Preload.asmdef
Normal file
16
Assets/GameScripts/Preload/GameScripts.Preload.asmdef
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "GameScripts.Preload",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:63f032f8696ad5b4e99c26f7a9f89060"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 921b262766d31374c8fd93ad67954b9c
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -11,5 +11,32 @@ public class PatchWindow : MonoBehaviour
|
||||
private void Awake()
|
||||
{
|
||||
video.targetCamera = GameManager.Inst.UICamera;
|
||||
PatchEvent.OnStatusUpdate += OnStatusUpdate;
|
||||
PatchEvent.OnProgressUpdate += OnProgressUpdate;
|
||||
PatchEvent.OnDownloadSizeUpdate += OnDownloadSizeUpdate;
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
PatchEvent.OnStatusUpdate -= OnStatusUpdate;
|
||||
PatchEvent.OnProgressUpdate -= OnProgressUpdate;
|
||||
PatchEvent.OnDownloadSizeUpdate -= OnDownloadSizeUpdate;
|
||||
}
|
||||
|
||||
private void OnStatusUpdate(string status)
|
||||
{
|
||||
if (statusText != null)
|
||||
statusText.text = status;
|
||||
}
|
||||
|
||||
private void OnProgressUpdate(float progress)
|
||||
{
|
||||
if (progressBar != null)
|
||||
progressBar.value = progress;
|
||||
}
|
||||
|
||||
private void OnDownloadSizeUpdate(string sizeText)
|
||||
{
|
||||
if (downloadSizeText != null)
|
||||
downloadSizeText.text = sizeText;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user