Files
vampire-like/Assets/GameMain/Scripts/Base/Event/Player/PlayerCoinChangeEventArgs.cs
T
SepComet affa44e4d0 调整 Event 和 Editor 命名空间
- 将原来的 CustomEvent 调整到 SepCore.Event
- 将 Editor 文件夹下的统一到 SepCore.Editor,顺带修改了 Editor 程序集
2026-06-02 19:26:21 +08:00

37 lines
876 B
C#

using GameFramework;
using GameFramework.Event;
namespace SepCore.Event
{
public class PlayerCoinChangeEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(PlayerCoinChangeEventArgs).GetHashCode();
public override int Id => EventId;
public int Gain { get; private set; }
public int CoinCount { get; private set; }
public PlayerCoinChangeEventArgs()
{
Gain = 0;
CoinCount = 0;
}
public static PlayerCoinChangeEventArgs Create(int gain, int coinCount)
{
var args = ReferencePool.Acquire<PlayerCoinChangeEventArgs>();
args.Gain = gain;
args.CoinCount = coinCount;
return args;
}
public override void Clear()
{
Gain = 0;
CoinCount = 0;
}
}
}