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