- 补充游戏核心逻辑

- 完成 TodOList P0
    - 添加游戏内控制台便于调试
    - 增加敌人互斥机制提高运算负载
    - 优化互斥算法将游戏性能基准线拉到 1k 敌人
This commit is contained in:
SepComet
2026-02-20 18:08:27 +08:00
parent b4bc8b0445
commit 3742110e9a
196 changed files with 4868 additions and 31326 deletions
@@ -1,28 +0,0 @@
using GameFramework;
using GameFramework.Event;
namespace CustomEvent
{
public class DisplayItemHideEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(DisplayItemHideEventArgs).GetHashCode();
public override int Id => EventId;
public DisplayItemHideEventArgs()
{
}
public static DisplayItemHideEventArgs Create()
{
var args = ReferencePool.Acquire<DisplayItemHideEventArgs>();
return args;
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,32 @@
using GameFramework;
using GameFramework.Event;
namespace CustomEvent
{
public class DisplayItemInfoHideEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(DisplayItemInfoHideEventArgs).GetHashCode();
public override int Id => EventId;
public bool Force = false;
public DisplayItemInfoHideEventArgs()
{
Force = false;
}
public static DisplayItemInfoHideEventArgs Create(bool force = false)
{
var args = ReferencePool.Acquire<DisplayItemInfoHideEventArgs>();
args.Force = force;
return args;
}
public override void Clear()
{
Force = false;
}
}
}
@@ -0,0 +1,27 @@
using GameFramework;
using GameFramework.Event;
namespace CustomEvent
{
public class DisplayItemInfoLockEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(DisplayItemInfoLockEventArgs).GetHashCode();
public override int Id => EventId;
public DisplayItemInfoLockEventArgs()
{
}
public static DisplayItemInfoLockEventArgs Create()
{
var args = ReferencePool.Acquire<DisplayItemInfoLockEventArgs>();
return args;
}
public override void Clear()
{
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 17754f00ac924fc29b3604cfed7a5efe
timeCreated: 1771488601
@@ -0,0 +1,32 @@
using GameFramework;
using GameFramework.Event;
namespace CustomEvent
{
public class LevelProcessEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(LevelProcessEventArgs).GetHashCode();
public override int Id => EventId;
public int LevelTimeLeft { get; private set; }
public LevelProcessEventArgs()
{
LevelTimeLeft = 60;
}
public static LevelProcessEventArgs Create(int timeLeft)
{
var args = ReferencePool.Acquire<LevelProcessEventArgs>();
args.LevelTimeLeft = timeLeft;
return args;
}
public override void Clear()
{
LevelTimeLeft = 60;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2955cc8506684108ba00e6a1e1504a35
timeCreated: 1771483221
@@ -0,0 +1,37 @@
using GameFramework;
using GameFramework.Event;
namespace CustomEvent
{
public class ShopWeaponRecycleEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(ShopWeaponRecycleEventArgs).GetHashCode();
public override int Id => EventId;
public int Index { get; private set; }
public int Price { get; private set; }
public ShopWeaponRecycleEventArgs()
{
Index = -1;
Price = 0;
}
public static ShopWeaponRecycleEventArgs Create(int index, int price)
{
var args = ReferencePool.Acquire<ShopWeaponRecycleEventArgs>();
args.Index = index;
args.Price = price;
return args;
}
public override void Clear()
{
Index = -1;
Price = 0;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2a11aec04bee4abf85e3df1d495e9f84
timeCreated: 1771487051