using System;
namespace ET.Client
{
public interface IYIUILoopOnClick
{
///
/// 点击事件
/// 调用SetOnClick方法设置点击事件信息后生效
///
void OnClick(Entity self, Entity item, object data, int index, bool select);
}
public interface IYIUILoopOnClick : ISystemType, IYIUILoopOnClick
{
}
[EntitySystem]
public abstract class YIUILoopOnClickSystem : SystemObject, IYIUILoopOnClick
where T1 : Entity, IYIUIBind, IYIUIInitialize
where T2 : Entity, IYIUIBind, IYIUIInitialize
{
Type ISystemType.Type()
{
return typeof(T1);
}
Type ISystemType.SystemType()
{
return typeof(IYIUILoopOnClick);
}
void IYIUILoopOnClick.OnClick(Entity self, Entity item, object data, int index, bool select)
{
YIUILoopOnClick((T1)self, (T2)item, (T3)data, index, select);
}
protected abstract void YIUILoopOnClick(T1 self, T2 item, T3 data, int index, bool select);
}
}