//------------------------------------------------------------------------------
//
// 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 {
public CoreGame.Render.AIComponent aI { get { return (CoreGame.Render.AIComponent)GetComponent(CombatComponentsLookup.AI); } }
public bool hasAI { get { return HasComponent(CombatComponentsLookup.AI); } }
public void AddAI(string newBtTreePath, CombatEntity newEnt) {
var index = CombatComponentsLookup.AI;
var component = (CoreGame.Render.AIComponent)CreateComponent(index, typeof(CoreGame.Render.AIComponent));
component.btTreePath = newBtTreePath;
component.ent = newEnt;
AddComponent(index, component);
}
public void ReplaceAI(string newBtTreePath, CombatEntity newEnt) {
var index = CombatComponentsLookup.AI;
var component = (CoreGame.Render.AIComponent)CreateComponent(index, typeof(CoreGame.Render.AIComponent));
component.btTreePath = newBtTreePath;
component.ent = newEnt;
ReplaceComponent(index, component);
}
public void RemoveAI() {
RemoveComponent(CombatComponentsLookup.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 CombatMatcher {
static Entitas.IMatcher _matcherAI;
public static Entitas.IMatcher AI {
get {
if (_matcherAI == null) {
var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.AI);
matcher.componentNames = CombatComponentsLookup.componentNames;
_matcherAI = matcher;
}
return _matcherAI;
}
}
}