- 将原来的 CustomEvent 调整到 SepCore.Event - 将 Editor 文件夹下的统一到 SepCore.Editor,顺带修改了 Editor 程序集
37 lines
897 B
C#
37 lines
897 B
C#
using GameFramework;
|
|
using GameFramework.Event;
|
|
|
|
namespace SepCore.Event
|
|
{
|
|
public class PlayerExpChangeEventArgs : GameEventArgs
|
|
{
|
|
public static readonly int EventId = typeof(PlayerExpChangeEventArgs).GetHashCode();
|
|
|
|
public override int Id => EventId;
|
|
|
|
public int CurrentExp { get; private set; }
|
|
|
|
public int MaxExp { get; private set; }
|
|
|
|
public PlayerExpChangeEventArgs()
|
|
{
|
|
CurrentExp = 0;
|
|
MaxExp = 0;
|
|
}
|
|
|
|
public static PlayerExpChangeEventArgs Create(int currentExp, int maxExp)
|
|
{
|
|
var args = ReferencePool.Acquire<PlayerExpChangeEventArgs>();
|
|
args.CurrentExp = currentExp;
|
|
args.MaxExp = maxExp;
|
|
|
|
return args;
|
|
}
|
|
|
|
public override void Clear()
|
|
{
|
|
CurrentExp = 0;
|
|
MaxExp = 0;
|
|
}
|
|
}
|
|
} |