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