geometry-tower-defense/Assets/GameMain/Scripts/Event/Combat/CombatProcessEventArgs.cs

37 lines
916 B
C#

using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class CombatProcessEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatProcessEventArgs).GetHashCode();
public override int Id => EventId;
public int CurrentPhase { get; private set; }
public int TotalPhase { get; private set; }
public CombatProcessEventArgs()
{
CurrentPhase = 0;
TotalPhase = 0;
}
public static CombatProcessEventArgs Create(int currentPhase, int totalPhase)
{
var args = ReferencePool.Acquire<CombatProcessEventArgs>();
args.CurrentPhase = currentPhase;
args.TotalPhase = totalPhase;
return args;
}
public override void Clear()
{
CurrentPhase = 0;
TotalPhase = 0;
}
}
}