调整目录结构

This commit is contained in:
2025-08-29 09:11:08 +08:00
parent efb64ce7bc
commit 1fff9db9ca
351 changed files with 304 additions and 215 deletions

View File

@@ -14,6 +14,8 @@ namespace NBF
public override string UIPackName => "Load";
public override string UIResName => "LoadingPanel";
[AutoFind(Name = "back")]
public GLoader back;
[AutoFind(Name = "Progress")]
public GProgressBar Progress;
[AutoFind(Name = "TextLoading")]

View File

@@ -2,6 +2,7 @@
using UnityEngine;
using NBC;
using NBC.Event;
namespace NBF
{
@@ -17,14 +18,32 @@ namespace NBF
}
}
public class OnLoadingProgressEvent : EventSystem<LoadingProgress>
{
protected override void Handler(LoadingProgress self)
{
LoadingPanel.SetProgress(self.Progress);
}
}
public partial class LoadingPanel : UIPanel
{
public static readonly LoadingTask<LoadingPanel> LoadingTask = new();
private static LoadingPanel _loadingPanel;
public static void SetProgress(float progress)
{
if (_loadingPanel != null)
{
_loadingPanel.Progress.value = progress * 100;
}
}
protected override void OnInit()
{
ContentPane.sortingOrder = UIDef.UIOrder.Loading;
_loadingPanel = this;
Progress.max = 100;
}
protected override void OnShow()