This commit is contained in:
2025-11-13 17:40:28 +08:00
parent 962ab49609
commit 10156da245
5503 changed files with 805282 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
using UnityEngine;
using Tuan.GameFramework;
namespace Tuan.GameScripts.Preload
{
public class GamePreload : Singleton<GamePreload>
{
public void Test(string msg)
{
Debug.Log($"GamePreload.Test:{msg}");
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f70a842d4d8919e41a34b7ad7012e9ff

View 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
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 921b262766d31374c8fd93ad67954b9c
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,51 @@
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Video;
using Tuan.GameFramework;
namespace Tuan.GameScripts.Preload
{
public class PatchWindow : MonoBehaviour
{
public Text statusText;
public Slider progressBar;
public Text downloadSizeText;
public VideoPlayer video;
private void Awake()
{
video.targetCamera = MainUICanvas.Inst.UICamera;
PatchEvent.OnStatusUpdate += OnStatusUpdate;
PatchEvent.OnProgressUpdate += OnProgressUpdate;
PatchEvent.OnDownloadSizeUpdate += OnDownloadSizeUpdate;
PatchEvent.OnClosePatchWindow += OnClosePatchWindow;
}
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;
}
private void OnClosePatchWindow()
{
gameObject.SetActive(false);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 5a0d239551fa52c4d9907777f1f485bf