//------------------------------------------------------------------------------ // // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ public partial class CombatEntity { public CoreGame.Render.SuppressorComponent suppressor { get { return (CoreGame.Render.SuppressorComponent)GetComponent(CombatComponentsLookup.Suppressor); } } public bool hasSuppressor { get { return HasComponent(CombatComponentsLookup.Suppressor); } } public void AddSuppressor(int newCasterEid, float newRadius, float newDuration) { var index = CombatComponentsLookup.Suppressor; var component = (CoreGame.Render.SuppressorComponent)CreateComponent(index, typeof(CoreGame.Render.SuppressorComponent)); component.casterEid = newCasterEid; component.radius = newRadius; component.duration = newDuration; AddComponent(index, component); } public void ReplaceSuppressor(int newCasterEid, float newRadius, float newDuration) { var index = CombatComponentsLookup.Suppressor; var component = (CoreGame.Render.SuppressorComponent)CreateComponent(index, typeof(CoreGame.Render.SuppressorComponent)); component.casterEid = newCasterEid; component.radius = newRadius; component.duration = newDuration; ReplaceComponent(index, component); } public void RemoveSuppressor() { RemoveComponent(CombatComponentsLookup.Suppressor); } } //------------------------------------------------------------------------------ // // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ public sealed partial class CombatMatcher { static Entitas.IMatcher _matcherSuppressor; public static Entitas.IMatcher Suppressor { get { if (_matcherSuppressor == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.Suppressor); matcher.componentNames = CombatComponentsLookup.componentNames; _matcherSuppressor = matcher; } return _matcherSuppressor; } } }