vampire-like/Assets/GameMain/Scripts/Base/Event/Shop/DisplayItemHoverEventArgs.cs

42 lines
1.0 KiB
C#

using GameFramework;
using GameFramework.Event;
using UnityEngine;
namespace SepCore.Event
{
public class DisplayItemHoverEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(DisplayItemHoverEventArgs).GetHashCode();
public override int Id => EventId;
public int Index;
public bool IsWeapon;
public Vector3 TargetPos;
public DisplayItemHoverEventArgs()
{
Index = -1;
IsWeapon = false;
TargetPos = Vector3.zero;
}
public static DisplayItemHoverEventArgs Create(int index, bool isWeapon, Vector3 targetPos)
{
var args = ReferencePool.Acquire<DisplayItemHoverEventArgs>();
args.Index = index;
args.IsWeapon = isWeapon;
args.TargetPos = targetPos;
return args;
}
public override void Clear()
{
Index = -1;
IsWeapon = false;
TargetPos = Vector3.zero;
}
}
}