This commit is contained in:
2026-03-13 17:58:09 +08:00
parent 777c58b812
commit c76fd85a2c
25 changed files with 1214 additions and 360 deletions
@@ -1,7 +1,5 @@
using GameFramework;
using GameFramework.Event;
using GeometryTD.CustomUtility;
using GeometryTD.Definition;
using GeometryTD.Procedure;
namespace GeometryTD.CustomEvent
@@ -24,7 +22,7 @@ namespace GeometryTD.CustomEvent
public bool CombatWon { get; private set; }
public BackpackInventoryData InventorySnapshotAfterNode { get; private set; }
public RunNodeCompletionSnapshot CompletionSnapshot { get; private set; }
public NodeCompleteEventArgs()
{
@@ -42,7 +40,7 @@ namespace GeometryTD.CustomEvent
int sequenceIndex,
RunNodeCompletionStatus completionStatus,
bool combatWon,
BackpackInventoryData inventorySnapshotAfterNode)
RunNodeCompletionSnapshot completionSnapshot)
{
var args = ReferencePool.Acquire<NodeCompleteEventArgs>();
args.RunId = runId;
@@ -51,7 +49,7 @@ namespace GeometryTD.CustomEvent
args.SequenceIndex = sequenceIndex;
args.CompletionStatus = completionStatus;
args.CombatWon = combatWon;
args.InventorySnapshotAfterNode = InventoryCloneUtility.CloneInventory(inventorySnapshotAfterNode);
args.CompletionSnapshot = completionSnapshot != null ? completionSnapshot.Clone() : null;
return args;
}
@@ -64,7 +62,7 @@ namespace GeometryTD.CustomEvent
SequenceIndex = -1;
CompletionStatus = RunNodeCompletionStatus.None;
CombatWon = false;
InventorySnapshotAfterNode = null;
CompletionSnapshot = null;
}
}
}