NBC修改
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
12
Assets/Scripts/UI/Loading/LoadingPanel.Designer.cs
generated
12
Assets/Scripts/UI/Loading/LoadingPanel.Designer.cs
generated
@@ -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>(); }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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(); });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user