46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using GameFramework;
|
|
using GameFramework.Event;
|
|
|
|
namespace Event
|
|
{
|
|
public enum CombineFeedbackType : byte
|
|
{
|
|
None = 0,
|
|
Success = 1,
|
|
OrderError = 2,
|
|
PositionError = 3
|
|
}
|
|
|
|
public class CombineFeedbackEventArgs : GameEventArgs
|
|
{
|
|
public static readonly int EventId = typeof(CombineFeedbackEventArgs).GetHashCode();
|
|
|
|
public override int Id => EventId;
|
|
|
|
public CombineFeedbackType FeedbackType { get; private set; }
|
|
|
|
public string Message { get; private set; }
|
|
|
|
public CombineFeedbackEventArgs()
|
|
{
|
|
FeedbackType = CombineFeedbackType.None;
|
|
Message = string.Empty;
|
|
}
|
|
|
|
public static CombineFeedbackEventArgs Create(CombineFeedbackType feedbackType, string message)
|
|
{
|
|
var args = ReferencePool.Acquire<CombineFeedbackEventArgs>();
|
|
|
|
args.FeedbackType = feedbackType;
|
|
args.Message = message ?? string.Empty;
|
|
return args;
|
|
}
|
|
|
|
public override void Clear()
|
|
{
|
|
FeedbackType = CombineFeedbackType.None;
|
|
Message = string.Empty;
|
|
}
|
|
}
|
|
}
|