多轮审查和修复

This commit is contained in:
2026-05-12 15:34:08 +08:00
parent f55d2a57c3
commit ebbbb7332e
805 changed files with 838724 additions and 1905 deletions

View File

@@ -31,22 +31,11 @@ namespace BaseGames.VFX
_map[e.type] = e.vfxRef;
}
/// <summary>根据 HitFxType 查找对应 VFX Prefab 引用。</summary>
/// <summary>根据 HitFxType 查找对应 VFX Prefab 引用。调用前必须先调用 Initialize()。</summary>
public bool TryGetHitFX(HitFxType type, out AssetReferenceGameObject vfxRef)
{
if (_map != null)
return _map.TryGetValue(type, out vfxRef);
// 未初始化时回退至线性查找
if (hitEffects != null)
{
foreach (var e in hitEffects)
{
if (e.type == type) { vfxRef = e.vfxRef; return true; }
}
}
vfxRef = default;
return false;
Debug.Assert(_map != null, "[VFXCatalogSO] TryGetHitFX 被调用前必须先调用 Initialize()。");
return _map.TryGetValue(type, out vfxRef);
}
}