//------------------------------------------------------------------------------ // // 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.DirectBulletComponent directBulletComponent = new CoreGame.Render.DirectBulletComponent(); public bool isDirectBullet { get { return HasComponent(CombatComponentsLookup.DirectBullet); } set { if (value != isDirectBullet) { var index = CombatComponentsLookup.DirectBullet; if (value) { var componentPool = GetComponentPool(index); var component = componentPool.Count > 0 ? componentPool.Pop() : directBulletComponent; 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 _matcherDirectBullet; public static Entitas.IMatcher DirectBullet { get { if (_matcherDirectBullet == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.DirectBullet); matcher.componentNames = CombatComponentsLookup.componentNames; _matcherDirectBullet = matcher; } return _matcherDirectBullet; } } }