NBC修改

This commit is contained in:
bob
2025-07-03 14:16:18 +08:00
parent 4febfadd56
commit 800e96aac7
2083 changed files with 60081 additions and 2942 deletions

View File

@@ -24,10 +24,10 @@ namespace NBF
LoadingPanel.LoadingTask.Add(waitTask);
}
var panel = UI.Inst.GetUI<LoadingPanel>();
var panel = App.UI.GetUI<LoadingPanel>();
if (panel is not { IsShowing: true })
{
UI.Inst.OpenUI<LoadingPanel>(new LoadingShowParam(style, startProgress));
LoadingPanel.Show(new LoadingShowParam(style, startProgress));
}
}

View File

@@ -11,10 +11,20 @@ namespace NBF
public partial class LoadingPanel
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
public override string UIPackName => "Load";
public override string UIResName => "LoadingPanel";
[AutoFind(Name = "Progress")]
public GProgressBar Progress;
public override string[] GetDependPackages(){ return new string[] {"Main"}; }
[AutoFind(Name = "TextLoading")]
public GTextField TextLoading;
public override string[] GetDependPackages(){ return new string[] {}; }
public static void Show(object param = null){ App.UI.OpenUI<LoadingPanel>(param); }
public static void Hide(){ App.UI.HideUI<LoadingPanel>(); }
public static void Del(){ App.UI.DestroyUI<LoadingPanel>(); }
}
}

View File

@@ -19,8 +19,6 @@ namespace NBF
public partial class LoadingPanel : UIPanel
{
public override string UIPackName => "Load";
public override string UIResName => "LoadingPanel";
public static readonly LoadingTask<LoadingPanel> LoadingTask = new();

View File

@@ -27,7 +27,7 @@ namespace NBF
public LoadingTask()
{
MonoManager.Inst.OnUpdate += OnUpdate;
App.OnUpdate += OnUpdate;
}
enum StepType
@@ -125,7 +125,8 @@ namespace NBF
private void End()
{
_step = StepType.Done;
UI.Inst.HideUI<T>();
App.UI.HideUI<T>();
// App.Main.TimerComponent.Unity.OnceTimer()
Timer.FrameOnce(1, this, _ => { Reset(); });
}
}