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.6 KiB
58 lines
2.6 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.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);
|
|
}
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <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> _matcherProperty;
|
|
|
|
public static Entitas.IMatcher<CombatEntity> Property {
|
|
get {
|
|
if (_matcherProperty == null) {
|
|
var matcher = (Entitas.Matcher<CombatEntity>)Entitas.Matcher<CombatEntity>.AllOf(CombatComponentsLookup.Property);
|
|
matcher.componentNames = CombatComponentsLookup.componentNames;
|
|
_matcherProperty = matcher;
|
|
}
|
|
|
|
return _matcherProperty;
|
|
}
|
|
}
|
|
}
|
|
|