1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-04 02:37:12 +08:00

refactor(Statemachine): 优化实体和物品掉落管理逻辑

重构 EntityBase 的 mobCount 方法为 getMobs 以返回完整列表
在 WorldManager 中添加 canNextWave 方法检查怪物和可收集物品
优化 ItemDropped 的玩家查找和收集条件判断逻辑
This commit is contained in:
2025-12-14 14:07:29 +08:00
parent 7168c690f3
commit c0d5faf668
3 changed files with 25 additions and 7 deletions
+2 -2
View File
@@ -489,5 +489,5 @@ static func generate(
if addToWorld:
WorldManager.rootNode.spawn(instance)
return instance
static func mobCount():
return len(WorldManager.tree.get_nodes_in_group("mobs"))
static func getMobs():
return WorldManager.tree.get_nodes_in_group("mobs")