You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.3 KiB
58 lines
2.3 KiB
//------------------------------------------------------------------------------
|
|
// <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 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);
|
|
}
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <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 CombatMatcher {
|
|
|
|
static Entitas.IMatcher<CombatEntity> _matcherAI;
|
|
|
|
public static Entitas.IMatcher<CombatEntity> AI {
|
|
get {
|
|
if (_matcherAI == null) {
|
|
var matcher = (Entitas.Matcher<CombatEntity>)Entitas.Matcher<CombatEntity>.AllOf(CombatComponentsLookup.AI);
|
|
matcher.componentNames = CombatComponentsLookup.componentNames;
|
|
_matcherAI = matcher;
|
|
}
|
|
|
|
return _matcherAI;
|
|
}
|
|
}
|
|
}
|
|
|