geometry-tower-defense/Assets/GameMain/Scripts/Event/Combat/CombatSelectItemClickEventA...

32 lines
974 B
C#

using GameFramework;
using GameFramework.Event;
using GeometryTD.UI;
namespace GeometryTD.CustomEvent
{
public class CombatSelectItemClickEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatSelectItemClickEventArgs).GetHashCode();
public override int Id => EventId;
public CombatSelectActionType ActionType { get; private set; } = CombatSelectActionType.None;
public int ActionIndex { get; private set; } = -1;
public static CombatSelectItemClickEventArgs Create(CombatSelectActionType actionType, int actionIndex)
{
CombatSelectItemClickEventArgs args = ReferencePool.Acquire<CombatSelectItemClickEventArgs>();
args.ActionType = actionType;
args.ActionIndex = actionIndex;
return args;
}
public override void Clear()
{
ActionType = CombatSelectActionType.None;
ActionIndex = -1;
}
}
}