using CoreGame.Render; namespace CoreGame.Render { public static class SuppressorSrv { public static CombatEntity CreateSuppressorEntityByAbility(GameAbilityContext ctx, float radius, float duration, string prefabPath) { var caster = ctx.ownerEnt; var ce = Contexts.Combat.CreateEntity("Suppressor"); ce.AddFaction(caster.faction.faction, SelectUseType.Suppressor); ce.AddSuppressor(caster.creationIndex, radius, duration); ce.AddAsset( new MainAssetParam() { path = prefabPath, parentNodeName = "RenderWorld", } , null); ce.AddTransformProxy(caster.transformProxy.position, caster.transformProxy.direction, ce); ce.transformProxy.Sync(); ce.transformProxy.Flush(); return ce; } } }