- 将 _tooltipLocked 状态从 ItemTooltipController 移到 ShopController 维护 - DisplayItem 只发 Shop 模块 UI 事件(Hover/Lock/Hide) - ItemTooltipForm 取消按钮发 ItemTooltip 模块事件自关闭 - ShopController 通过 UIRouter 跨模块控制 ItemTooltipForm - 移除 DisplayItemHideEventArgs 的 Force 字段,分离两种关闭场景
34 lines
725 B
C#
34 lines
725 B
C#
using GameFramework;
|
|
using GameFramework.Event;
|
|
|
|
namespace SepCore.Event
|
|
{
|
|
public class ShopPurchaseEventArgs : GameEventArgs
|
|
{
|
|
public static readonly int EventId = typeof(ShopPurchaseEventArgs).GetHashCode();
|
|
|
|
public override int Id => EventId;
|
|
|
|
public int GoodsIndex { get; private set; }
|
|
|
|
public ShopPurchaseEventArgs()
|
|
{
|
|
GoodsIndex = -1;
|
|
}
|
|
|
|
public static ShopPurchaseEventArgs Create(int index)
|
|
{
|
|
var args = ReferencePool.Acquire<ShopPurchaseEventArgs>();
|
|
|
|
args.GoodsIndex = index;
|
|
|
|
return args;
|
|
}
|
|
|
|
public override void Clear()
|
|
{
|
|
GoodsIndex = -1;
|
|
}
|
|
}
|
|
}
|