This commit is contained in:
2026-04-30 19:33:16 +08:00
commit fb2252f688
556 changed files with 69721 additions and 0 deletions
@@ -0,0 +1,68 @@
using GameFramework;
using GameFramework.Event;
using GeometryTD.Procedure;
namespace GeometryTD.CustomEvent
{
public class NodeCompleteEventArgs : GameEventArgs
{
public static int EventId = typeof(NodeCompleteEventArgs).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 RunNodeCompletionStatus CompletionStatus { get; private set; }
public bool CombatWon { get; private set; }
public RunNodeCompletionSnapshot CompletionSnapshot { get; private set; }
public NodeCompleteEventArgs()
{
}
public static NodeCompleteEventArgs Create()
{
return Create(null, 0, RunNodeType.None, -1, RunNodeCompletionStatus.Completed, true, null);
}
public static NodeCompleteEventArgs Create(
string runId,
int nodeId,
RunNodeType nodeType,
int sequenceIndex,
RunNodeCompletionStatus completionStatus,
bool combatWon,
RunNodeCompletionSnapshot completionSnapshot)
{
var args = ReferencePool.Acquire<NodeCompleteEventArgs>();
args.RunId = runId;
args.NodeId = nodeId;
args.NodeType = nodeType;
args.SequenceIndex = sequenceIndex;
args.CompletionStatus = completionStatus;
args.CombatWon = combatWon;
args.CompletionSnapshot = completionSnapshot != null ? completionSnapshot.Clone() : null;
return args;
}
public override void Clear()
{
RunId = null;
NodeId = 0;
NodeType = RunNodeType.None;
SequenceIndex = -1;
CompletionStatus = RunNodeCompletionStatus.None;
CombatWon = false;
CompletionSnapshot = null;
}
}
}
+49
View File
@@ -0,0 +1,49 @@
using GameFramework;
using GameFramework.Event;
using GeometryTD.Procedure;
namespace GeometryTD.CustomEvent
{
public class NodeEnterEventArgs : GameEventArgs
{
public static int EventId = typeof(NodeEnterEventArgs).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 NodeEnterEventArgs()
{
}
public static NodeEnterEventArgs Create()
{
return Create(null, 0, RunNodeType.None, -1);
}
public static NodeEnterEventArgs Create(string runId, int nodeId, RunNodeType nodeType, int sequenceIndex)
{
var args = ReferencePool.Acquire<NodeEnterEventArgs>();
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;
}
}
}
@@ -0,0 +1,26 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public sealed class NodeMapNodeClickEventArgs : GameEventArgs
{
public static int EventId => typeof(NodeMapNodeClickEventArgs).GetHashCode();
public override int Id => EventId;
public int SequenceIndex { get; private set; }
public static NodeMapNodeClickEventArgs Create(int sequenceIndex)
{
NodeMapNodeClickEventArgs args = ReferencePool.Acquire<NodeMapNodeClickEventArgs>();
args.SequenceIndex = sequenceIndex;
return args;
}
public override void Clear()
{
SequenceIndex = -1;
}
}
}
@@ -0,0 +1,43 @@
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;
}
}
}
@@ -0,0 +1,33 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public enum TestMenuNodeType : byte
{
Combat = 1,
Event = 2,
Shop = 3
}
public class TestMenuNodeClickEventArgs : GameEventArgs
{
public static int EventId => typeof(TestMenuNodeClickEventArgs).GetHashCode();
public override int Id => EventId;
public TestMenuNodeType NodeType { get; private set; }
public static TestMenuNodeClickEventArgs Create(TestMenuNodeType nodeType)
{
TestMenuNodeClickEventArgs args = ReferencePool.Acquire<TestMenuNodeClickEventArgs>();
args.NodeType = nodeType;
return args;
}
public override void Clear()
{
NodeType = 0;
}
}
}