38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using Cysharp.Threading.Tasks;
|
|
using SepCore.Definition;
|
|
using UnityGameFramework.Runtime;
|
|
|
|
namespace SepCore.UI
|
|
{
|
|
public class HudController : UIControllerBase<HudContext, HudForm>
|
|
{
|
|
protected override UIFormType UIFormType => UIFormType.HudForm;
|
|
|
|
protected override void RefreshUI(HudForm form, HudContext context)
|
|
{
|
|
form.RefreshUI(context);
|
|
}
|
|
|
|
private static HudContext BuildHudContext()
|
|
{
|
|
return new HudContext();
|
|
}
|
|
|
|
public override async UniTask<int?> OpenUIAsync(object userData = null, float timeout = 30f)
|
|
{
|
|
if (userData != null)
|
|
{
|
|
Log.Warning("HudController.OpenUIAsync() userData type is invalid.");
|
|
return null;
|
|
}
|
|
|
|
return await OpenFormAsync(BuildHudContext(), timeout);
|
|
}
|
|
|
|
public override void BindUseCase(IUIUseCase useCase)
|
|
{
|
|
Log.Info("HudFormController doesn't need UseCase");
|
|
}
|
|
}
|
|
}
|