CTT/Unity/Assets/HotfixView/UI/UpgradeUI/UpgradeUIEvent.cs

26 lines
629 B
C#

using ET;
using System;
using System.Collections.Generic;
namespace ET
{
[UIEvent(FUIPackage.Bag_UpgradeUI)]
public class UpgradeUIEvent : AUIEvent
{
public override async ETTask<FUI> OnCreate(FUIComponent fuiComponent)
{
if (!(FUIComponent.Instance.Get(FUIPackage.Bag_UpgradeUI) is FUI_UpgradeUI ui))
{
ui =await FUI_UpgradeUI.CreateInstanceAsync(fuiComponent);
ui.Name = FUIPackage.Bag_UpgradeUI;
}
return ui;
}
public override void OnRemove(FUIComponent fuiComponent)
{
}
}
}