init
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user