//------------------------------------------------------------------------------
//
// 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.PropertyContainer.PropertyComponent property { get { return (CoreGame.Render.PropertyContainer.PropertyComponent)GetComponent(CombatComponentsLookup.Property); } }
public bool hasProperty { get { return HasComponent(CombatComponentsLookup.Property); } }
public void AddProperty(CombatEntity newEnt, CoreGame.Render.PropertyContainer newContainer) {
var index = CombatComponentsLookup.Property;
var component = (CoreGame.Render.PropertyContainer.PropertyComponent)CreateComponent(index, typeof(CoreGame.Render.PropertyContainer.PropertyComponent));
component.ent = newEnt;
component.container = newContainer;
AddComponent(index, component);
}
public void ReplaceProperty(CombatEntity newEnt, CoreGame.Render.PropertyContainer newContainer) {
var index = CombatComponentsLookup.Property;
var component = (CoreGame.Render.PropertyContainer.PropertyComponent)CreateComponent(index, typeof(CoreGame.Render.PropertyContainer.PropertyComponent));
component.ent = newEnt;
component.container = newContainer;
ReplaceComponent(index, component);
}
public void RemoveProperty() {
RemoveComponent(CombatComponentsLookup.Property);
}
}
//------------------------------------------------------------------------------
//
// 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 _matcherProperty;
public static Entitas.IMatcher Property {
get {
if (_matcherProperty == null) {
var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.Property);
matcher.componentNames = CombatComponentsLookup.componentNames;
_matcherProperty = matcher;
}
return _matcherProperty;
}
}
}