|  |  |  | //------------------------------------------------------------------------------ | 
					
						
							|  |  |  | // <auto-generated> | 
					
						
							|  |  |  | //     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. | 
					
						
							|  |  |  | // </auto-generated> | 
					
						
							|  |  |  | //------------------------------------------------------------------------------ | 
					
						
							|  |  |  | public partial class GameEntity { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     public AIComponent aI { get { return (AIComponent)GetComponent(GameComponentsLookup.AI); } } | 
					
						
							|  |  |  |     public bool hasAI { get { return HasComponent(GameComponentsLookup.AI); } } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     public void AddAI(float newThinkCdMax, float newThinkCdNow, Game.MetaData<float> newHungry, Game.MetaData<float> newHungryMax, Game.MetaData<Game.EAIModuleType> newModuleType, float newHungryIncrease, float newHungryIncreaseRate, Game.MetaData<bool> newIsHungryFull, Game.MetaData<bool> newAttackPermit, Game.BehaviorTreePoolItem newBehaviorTree) { | 
					
						
							|  |  |  |         var index = GameComponentsLookup.AI; | 
					
						
							|  |  |  |         var component = (AIComponent)CreateComponent(index, typeof(AIComponent)); | 
					
						
							|  |  |  |         component.ThinkCdMax = newThinkCdMax; | 
					
						
							|  |  |  |         component.ThinkCdNow = newThinkCdNow; | 
					
						
							|  |  |  |         component.Hungry = newHungry; | 
					
						
							|  |  |  |         component.HungryMax = newHungryMax; | 
					
						
							|  |  |  |         component.ModuleType = newModuleType; | 
					
						
							|  |  |  |         component.HungryIncrease = newHungryIncrease; | 
					
						
							|  |  |  |         component.HungryIncreaseRate = newHungryIncreaseRate; | 
					
						
							|  |  |  |         component.IsHungryFull = newIsHungryFull; | 
					
						
							|  |  |  |         component.AttackPermit = newAttackPermit; | 
					
						
							|  |  |  |         component.BehaviorTree = newBehaviorTree; | 
					
						
							|  |  |  |         AddComponent(index, component); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     public void ReplaceAI(float newThinkCdMax, float newThinkCdNow, Game.MetaData<float> newHungry, Game.MetaData<float> newHungryMax, Game.MetaData<Game.EAIModuleType> newModuleType, float newHungryIncrease, float newHungryIncreaseRate, Game.MetaData<bool> newIsHungryFull, Game.MetaData<bool> newAttackPermit, Game.BehaviorTreePoolItem newBehaviorTree) { | 
					
						
							|  |  |  |         var index = GameComponentsLookup.AI; | 
					
						
							|  |  |  |         var component = (AIComponent)CreateComponent(index, typeof(AIComponent)); | 
					
						
							|  |  |  |         component.ThinkCdMax = newThinkCdMax; | 
					
						
							|  |  |  |         component.ThinkCdNow = newThinkCdNow; | 
					
						
							|  |  |  |         component.Hungry = newHungry; | 
					
						
							|  |  |  |         component.HungryMax = newHungryMax; | 
					
						
							|  |  |  |         component.ModuleType = newModuleType; | 
					
						
							|  |  |  |         component.HungryIncrease = newHungryIncrease; | 
					
						
							|  |  |  |         component.HungryIncreaseRate = newHungryIncreaseRate; | 
					
						
							|  |  |  |         component.IsHungryFull = newIsHungryFull; | 
					
						
							|  |  |  |         component.AttackPermit = newAttackPermit; | 
					
						
							|  |  |  |         component.BehaviorTree = newBehaviorTree; | 
					
						
							|  |  |  |         ReplaceComponent(index, component); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     public void RemoveAI() { | 
					
						
							|  |  |  |         RemoveComponent(GameComponentsLookup.AI); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //------------------------------------------------------------------------------ | 
					
						
							|  |  |  | // <auto-generated> | 
					
						
							|  |  |  | //     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. | 
					
						
							|  |  |  | // </auto-generated> | 
					
						
							|  |  |  | //------------------------------------------------------------------------------ | 
					
						
							|  |  |  | public sealed partial class GameMatcher { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     static Entitas.IMatcher<GameEntity> _matcherAI; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     public static Entitas.IMatcher<GameEntity> AI { | 
					
						
							|  |  |  |         get { | 
					
						
							|  |  |  |             if (_matcherAI == null) { | 
					
						
							|  |  |  |                 var matcher = (Entitas.Matcher<GameEntity>)Entitas.Matcher<GameEntity>.AllOf(GameComponentsLookup.AI); | 
					
						
							|  |  |  |                 matcher.componentNames = GameComponentsLookup.componentNames; | 
					
						
							|  |  |  |                 _matcherAI = matcher; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             return _matcherAI; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |