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,37 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class CombatBaseHpChangedEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatBaseHpChangedEventArgs).GetHashCode();
public override int Id => EventId;
public int CurrentBaseHp { get; private set; }
public int DeltaBaseHp { get; private set; }
public CombatBaseHpChangedEventArgs()
{
CurrentBaseHp = 100;
DeltaBaseHp = 0;
}
public static CombatBaseHpChangedEventArgs Create(int currentBaseHp, int deltaBaseHp = 0)
{
var args = ReferencePool.Acquire<CombatBaseHpChangedEventArgs>();
args.CurrentBaseHp = currentBaseHp;
args.DeltaBaseHp = deltaBaseHp;
return args;
}
public override void Clear()
{
CurrentBaseHp = 100;
DeltaBaseHp = 0;
}
}
}
@@ -0,0 +1,37 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class CombatCoinChangedEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatCoinChangedEventArgs).GetHashCode();
public override int Id => EventId;
public int CurrentCoin { get; private set; }
public int DeltaCoin { get; private set; }
public CombatCoinChangedEventArgs()
{
CurrentCoin = 0;
DeltaCoin = 0;
}
public static CombatCoinChangedEventArgs Create(int currentCoin, int deltaCoin = 0)
{
var args = ReferencePool.Acquire<CombatCoinChangedEventArgs>();
args.CurrentCoin = currentCoin;
args.DeltaCoin = deltaCoin;
return args;
}
public override void Clear()
{
CurrentCoin = 0;
DeltaCoin = 0;
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class CombatDebugFailEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatDebugFailEventArgs).GetHashCode();
public override int Id => EventId;
public static CombatDebugFailEventArgs Create()
{
return ReferencePool.Acquire<CombatDebugFailEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,25 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class CombatEndEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatEndEventArgs).GetHashCode();
public override int Id => EventId;
public CombatEndEventArgs()
{
}
public static CombatEndEventArgs Create()
{
return ReferencePool.Acquire<CombatEndEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,31 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class CombatEnemyHpRateChangedEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatEnemyHpRateChangedEventArgs).GetHashCode();
public override int Id => EventId;
public int EnemyHpRateMultiplier { get; private set; }
public CombatEnemyHpRateChangedEventArgs()
{
EnemyHpRateMultiplier = 1;
}
public static CombatEnemyHpRateChangedEventArgs Create(int enemyHpRateMultiplier)
{
var args = ReferencePool.Acquire<CombatEnemyHpRateChangedEventArgs>();
args.EnemyHpRateMultiplier = enemyHpRateMultiplier > 0 ? enemyHpRateMultiplier : 1;
return args;
}
public override void Clear()
{
EnemyHpRateMultiplier = 1;
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class CombatFinishReturnEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatFinishReturnEventArgs).GetHashCode();
public override int Id => EventId;
public static CombatFinishReturnEventArgs Create()
{
return ReferencePool.Acquire<CombatFinishReturnEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class CombatPauseEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatPauseEventArgs).GetHashCode();
public override int Id => EventId;
public static CombatPauseEventArgs Create()
{
return ReferencePool.Acquire<CombatPauseEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,37 @@
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;
}
}
}
@@ -0,0 +1,31 @@
using GameFramework;
using GameFramework.Event;
using GeometryTD.UI;
namespace GeometryTD.CustomEvent
{
public class CombatSelectItemClickEventArgs : GameEventArgs
{
public static int EventId => typeof(CombatSelectItemClickEventArgs).GetHashCode();
public override int Id => EventId;
public CombatSelectActionType ActionType { get; private set; } = CombatSelectActionType.None;
public int ActionIndex { get; private set; } = -1;
public static CombatSelectItemClickEventArgs Create(CombatSelectActionType actionType, int actionIndex)
{
CombatSelectItemClickEventArgs args = ReferencePool.Acquire<CombatSelectItemClickEventArgs>();
args.ActionType = actionType;
args.ActionIndex = actionIndex;
return args;
}
public override void Clear()
{
ActionType = CombatSelectActionType.None;
ActionIndex = -1;
}
}
}
@@ -0,0 +1,27 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class EventOptionItemSelectedEventArgs : GameEventArgs
{
public static int EventId => typeof(EventOptionItemSelectedEventArgs).GetHashCode();
public override int Id => EventId;
public int SelectedItemId { get; private set; } = -1;
public static EventOptionItemSelectedEventArgs Create(int selectedItemId)
{
var args = ReferencePool.Acquire<EventOptionItemSelectedEventArgs>();
args.SelectedItemId = selectedItemId;
return args;
}
public override void Clear()
{
SelectedItemId = -1;
}
}
}
@@ -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;
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class RewardSelectGiveUpEventArgs : GameEventArgs
{
public static int EventId => typeof(RewardSelectGiveUpEventArgs).GetHashCode();
public override int Id => EventId;
public static RewardSelectGiveUpEventArgs Create()
{
return ReferencePool.Acquire<RewardSelectGiveUpEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,26 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class RewardSelectItemSelectedEventArgs : GameEventArgs
{
public static int EventId => typeof(RewardSelectItemSelectedEventArgs).GetHashCode();
public override int Id => EventId;
public int SelectedIndex { get; private set; } = -1;
public static RewardSelectItemSelectedEventArgs Create(int selectedIndex)
{
RewardSelectItemSelectedEventArgs args = ReferencePool.Acquire<RewardSelectItemSelectedEventArgs>();
args.SelectedIndex = selectedIndex;
return args;
}
public override void Clear()
{
SelectedIndex = -1;
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class RewardSelectRefreshEventArgs : GameEventArgs
{
public static int EventId => typeof(RewardSelectRefreshEventArgs).GetHashCode();
public override int Id => EventId;
public static RewardSelectRefreshEventArgs Create()
{
return ReferencePool.Acquire<RewardSelectRefreshEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,27 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class RepoButtonClickedEventArgs : GameEventArgs
{
public static int EventId = typeof(RepoButtonClickedEventArgs).GetHashCode();
public override int Id => EventId;
public RepoButtonClickedEventArgs()
{
}
public static RepoButtonClickedEventArgs Create()
{
var args = ReferencePool.Acquire<RepoButtonClickedEventArgs>();
return args;
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,27 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class ReturnButtonClickedEventArgs : GameEventArgs
{
public static int EventId = typeof(ReturnButtonClickedEventArgs).GetHashCode();
public override int Id => EventId;
public ReturnButtonClickedEventArgs()
{
}
public static ReturnButtonClickedEventArgs Create()
{
var args = ReferencePool.Acquire<ReturnButtonClickedEventArgs>();
return args;
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class MenuExitRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(MenuExitRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public static MenuExitRequestedEventArgs Create()
{
return ReferencePool.Acquire<MenuExitRequestedEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class MenuSettingsRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(MenuSettingsRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public static MenuSettingsRequestedEventArgs Create()
{
return ReferencePool.Acquire<MenuSettingsRequestedEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class MenuStartRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(MenuStartRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public static MenuStartRequestedEventArgs Create()
{
return ReferencePool.Acquire<MenuStartRequestedEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,26 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class CombineSlotClickedEventArgs : GameEventArgs
{
public static int EventId => typeof(CombineSlotClickedEventArgs).GetHashCode();
public override int Id => EventId;
public int SlotIndex { get; private set; } = -1;
public static CombineSlotClickedEventArgs Create(int slotIndex)
{
CombineSlotClickedEventArgs args = ReferencePool.Acquire<CombineSlotClickedEventArgs>();
args.SlotIndex = slotIndex;
return args;
}
public override void Clear()
{
SlotIndex = -1;
}
}
}
@@ -0,0 +1,32 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public sealed class RepoCombineRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(RepoCombineRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public long MuzzleItemId { get; private set; }
public long BearingItemId { get; private set; }
public long BaseItemId { get; private set; }
public static RepoCombineRequestedEventArgs Create(long muzzleItemId, long bearingItemId, long baseItemId)
{
RepoCombineRequestedEventArgs args = ReferencePool.Acquire<RepoCombineRequestedEventArgs>();
args.MuzzleItemId = muzzleItemId;
args.BearingItemId = bearingItemId;
args.BaseItemId = baseItemId;
return args;
}
public override void Clear()
{
MuzzleItemId = 0;
BearingItemId = 0;
BaseItemId = 0;
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class RepoFormReturnEventArgs : GameEventArgs
{
public static int EventId => typeof(RepoFormReturnEventArgs).GetHashCode();
public override int Id => EventId;
public override void Clear()
{
}
public static RepoFormReturnEventArgs Create()
{
return ReferencePool.Acquire<RepoFormReturnEventArgs>();
}
}
}
@@ -0,0 +1,31 @@
using GameFramework;
using GameFramework.Event;
using UnityEngine;
namespace GeometryTD.CustomEvent
{
public sealed class RepoItemClickedEventArgs : GameEventArgs
{
public static int EventId => typeof(RepoItemClickedEventArgs).GetHashCode();
public override int Id => EventId;
public long ItemId { get; private set; }
public Vector2 ScreenPosition { get; private set; }
public static RepoItemClickedEventArgs Create(long itemId, Vector2 screenPosition)
{
RepoItemClickedEventArgs args = ReferencePool.Acquire<RepoItemClickedEventArgs>();
args.ItemId = itemId;
args.ScreenPosition = screenPosition;
return args;
}
public override void Clear()
{
ItemId = 0;
ScreenPosition = Vector2.zero;
}
}
}
@@ -0,0 +1,30 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public class RepoItemDragEndedEventArgs : GameEventArgs
{
public static int EventId => typeof(RepoItemDragEndedEventArgs).GetHashCode();
public override int Id => EventId;
public long ItemId { get; private set; }
public bool Assigned { get; private set; }
public static RepoItemDragEndedEventArgs Create(long itemId, bool assigned)
{
RepoItemDragEndedEventArgs args = ReferencePool.Acquire<RepoItemDragEndedEventArgs>();
args.ItemId = itemId;
args.Assigned = assigned;
return args;
}
public override void Clear()
{
ItemId = 0;
Assigned = false;
}
}
}
@@ -0,0 +1,27 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public sealed class RepoParticipantAssignRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(RepoParticipantAssignRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public long TowerItemId { get; private set; }
public static RepoParticipantAssignRequestedEventArgs Create(long towerItemId)
{
RepoParticipantAssignRequestedEventArgs args =
ReferencePool.Acquire<RepoParticipantAssignRequestedEventArgs>();
args.TowerItemId = towerItemId;
return args;
}
public override void Clear()
{
TowerItemId = 0;
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public sealed class RepoSellCancelRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(RepoSellCancelRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public static RepoSellCancelRequestedEventArgs Create()
{
return ReferencePool.Acquire<RepoSellCancelRequestedEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public sealed class RepoSellConfirmRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(RepoSellConfirmRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public static RepoSellConfirmRequestedEventArgs Create()
{
return ReferencePool.Acquire<RepoSellConfirmRequestedEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public sealed class RepoSellModeToggleRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(RepoSellModeToggleRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public static RepoSellModeToggleRequestedEventArgs Create()
{
return ReferencePool.Acquire<RepoSellModeToggleRequestedEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public sealed class ShopExitRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(ShopExitRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public static ShopExitRequestedEventArgs Create()
{
return ReferencePool.Acquire<ShopExitRequestedEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,21 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public sealed class ShopInventoryRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(ShopInventoryRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public static ShopInventoryRequestedEventArgs Create()
{
return ReferencePool.Acquire<ShopInventoryRequestedEventArgs>();
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,26 @@
using GameFramework;
using GameFramework.Event;
namespace GeometryTD.CustomEvent
{
public sealed class ShopPurchaseRequestedEventArgs : GameEventArgs
{
public static int EventId => typeof(ShopPurchaseRequestedEventArgs).GetHashCode();
public override int Id => EventId;
public int GoodsIndex { get; private set; }
public static ShopPurchaseRequestedEventArgs Create(int goodsIndex)
{
ShopPurchaseRequestedEventArgs args = ReferencePool.Acquire<ShopPurchaseRequestedEventArgs>();
args.GoodsIndex = goodsIndex;
return args;
}
public override void Clear()
{
GoodsIndex = -1;
}
}
}