48 lines
1.0 KiB
C#
48 lines
1.0 KiB
C#
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
|
|
|
|
using UnityEngine;
|
|
using NBC;
|
|
|
|
namespace NBF
|
|
{
|
|
public struct LoadingShowParam
|
|
{
|
|
public int Style;
|
|
public int StartProgress;
|
|
|
|
public LoadingShowParam(int style, int startProgress)
|
|
{
|
|
StartProgress = startProgress;
|
|
Style = style;
|
|
}
|
|
}
|
|
|
|
public partial class LoadingPanel : UIPanel
|
|
{
|
|
public override string UIPackName => "Load";
|
|
public override string UIResName => "LoadingPanel";
|
|
|
|
public static readonly LoadingTask<LoadingPanel> LoadingTask = new();
|
|
|
|
protected override void OnInit()
|
|
{
|
|
ContentPane.sortingOrder = UIDef.UIOrder.Loading;
|
|
}
|
|
|
|
protected override void OnShow()
|
|
{
|
|
base.OnShow();
|
|
Progress.value = 100;
|
|
}
|
|
|
|
protected override void OnHide()
|
|
{
|
|
base.OnHide();
|
|
}
|
|
|
|
protected override void OnDestroy()
|
|
{
|
|
base.OnDestroy();
|
|
}
|
|
}
|
|
} |