//------------------------------------------------------------------------------ // // 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 GameEntity { public AIComponent aI { get { return (AIComponent)GetComponent(GameComponentsLookup.AI); } } public bool hasAI { get { return HasComponent(GameComponentsLookup.AI); } } public void AddAI( bool newIsInit, Game.EAIModuleType newModuleType, int newTarget, float newThinkCDMax, float newThinkCDNow, Game.MetaData newHungry, Game.MetaData newHungryMax, float newHungryIncrease, float newHungryIncreaseRate) { var index = GameComponentsLookup.AI; var component = (AIComponent)CreateComponent(index, typeof(AIComponent)); component.IsInit = newIsInit; component.ThinkCdMax = newThinkCDMax; component.ThinkCdNow = newThinkCDNow; component.Hungry = newHungry; component.HungryMax = newHungryMax; component.HungryIncrease = newHungryIncrease; component.HungryIncreaseRate = newHungryIncreaseRate; AddComponent(index, component); } public void ReplaceAI( bool newIsInit, Game.EAIModuleType newModuleType, int newTarget, float newThinkCDMax, float newThinkCDNow, Game.MetaData newHungry, Game.MetaData newHungryMax, float newHungryIncrease, float newHungryIncreaseRate) { var index = GameComponentsLookup.AI; var component = (AIComponent)CreateComponent(index, typeof(AIComponent)); component.IsInit = newIsInit; component.ThinkCdMax = newThinkCDMax; component.ThinkCdNow = newThinkCDNow; component.Hungry = newHungry; component.HungryMax = newHungryMax; component.HungryIncrease = newHungryIncrease; component.HungryIncreaseRate = newHungryIncreaseRate; ReplaceComponent(index, component); } public void RemoveAI() { RemoveComponent(GameComponentsLookup.AI); } } //------------------------------------------------------------------------------ // // 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 GameMatcher { static Entitas.IMatcher _matcherAI; public static Entitas.IMatcher AI { get { if (_matcherAI == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.AI); matcher.componentNames = GameComponentsLookup.componentNames; _matcherAI = matcher; } return _matcherAI; } } }