geometry-tower-defense-base/src-ref/Event/Game/NodeMapNodeEnterRequestedEv...

44 lines
1.2 KiB
C#

using GameFramework;
using GameFramework.Event;
using GeometryTD.Procedure;
namespace GeometryTD.CustomEvent
{
public sealed class NodeMapNodeEnterRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(NodeMapNodeEnterRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public string RunId { get; private set; }
public int NodeId { get; private set; }
public RunNodeType NodeType { get; private set; }
public int SequenceIndex { get; private set; }
public static NodeMapNodeEnterRequestedEventArgs Create(
string runId,
int nodeId,
RunNodeType nodeType,
int sequenceIndex)
{
NodeMapNodeEnterRequestedEventArgs args = ReferencePool.Acquire<NodeMapNodeEnterRequestedEventArgs>();
args.RunId = runId;
args.NodeId = nodeId;
args.NodeType = nodeType;
args.SequenceIndex = sequenceIndex;
return args;
}
public override void Clear()
{
RunId = null;
NodeId = 0;
NodeType = RunNodeType.None;
SequenceIndex = -1;
}
}
}