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