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

26 lines
629 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
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)
{
}
}
}