40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using GameFramework;
|
|
using GameFramework.Event;
|
|
|
|
namespace SepCore.Event
|
|
{
|
|
public class WaveHarvestSettlementEventArgs : GameEventArgs
|
|
{
|
|
public static readonly int EventId = typeof(WaveHarvestSettlementEventArgs).GetHashCode();
|
|
|
|
public override int Id => EventId;
|
|
|
|
public int HarvestIncome { get; private set; }
|
|
public int HarvestGrowth { get; private set; }
|
|
public int CurrentHarvest { get; private set; }
|
|
|
|
public WaveHarvestSettlementEventArgs()
|
|
{
|
|
HarvestIncome = 0;
|
|
HarvestGrowth = 0;
|
|
CurrentHarvest = 0;
|
|
}
|
|
|
|
public static WaveHarvestSettlementEventArgs Create(int income, int growth, int currentHarvest)
|
|
{
|
|
var args = ReferencePool.Acquire<WaveHarvestSettlementEventArgs>();
|
|
args.HarvestIncome = income;
|
|
args.HarvestGrowth = growth;
|
|
args.CurrentHarvest = currentHarvest;
|
|
return args;
|
|
}
|
|
|
|
public override void Clear()
|
|
{
|
|
HarvestIncome = 0;
|
|
HarvestGrowth = 0;
|
|
CurrentHarvest = 0;
|
|
}
|
|
}
|
|
}
|