//------------------------------------------------------------------------------ // // 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 { static readonly CoreGame.Render.DestroyEntComponent destroyEntComponent = new CoreGame.Render.DestroyEntComponent(); public bool isDestroyEnt { get { return HasComponent(CombatComponentsLookup.DestroyEnt); } set { if (value != isDestroyEnt) { var index = CombatComponentsLookup.DestroyEnt; if (value) { var componentPool = GetComponentPool(index); var component = componentPool.Count > 0 ? componentPool.Pop() : destroyEntComponent; AddComponent(index, component); } else { RemoveComponent(index); } } } } } //------------------------------------------------------------------------------ // // 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 _matcherDestroyEnt; public static Entitas.IMatcher DestroyEnt { get { if (_matcherDestroyEnt == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.DestroyEnt); matcher.componentNames = CombatComponentsLookup.componentNames; _matcherDestroyEnt = matcher; } return _matcherDestroyEnt; } } }