//------------------------------------------------------------------------------
//
// 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.FactionComponent faction { get { return (CoreGame.Render.FactionComponent)GetComponent(CombatComponentsLookup.Faction); } }
public bool hasFaction { get { return HasComponent(CombatComponentsLookup.Faction); } }
public void AddFaction(CoreGame.Render.Faction newFaction, CoreGame.Render.SelectUseType newSelectUseType, CoreGame.Render.QueryParam newCommonBeQueryParam, CoreGame.Render.Faction newOpposite) {
var index = CombatComponentsLookup.Faction;
var component = (CoreGame.Render.FactionComponent)CreateComponent(index, typeof(CoreGame.Render.FactionComponent));
component.faction = newFaction;
component.selectUseType = newSelectUseType;
component.commonBeQueryParam = newCommonBeQueryParam;
component.opposite = newOpposite;
AddComponent(index, component);
}
public void ReplaceFaction(CoreGame.Render.Faction newFaction, CoreGame.Render.SelectUseType newSelectUseType, CoreGame.Render.QueryParam newCommonBeQueryParam, CoreGame.Render.Faction newOpposite) {
var index = CombatComponentsLookup.Faction;
var component = (CoreGame.Render.FactionComponent)CreateComponent(index, typeof(CoreGame.Render.FactionComponent));
component.faction = newFaction;
component.selectUseType = newSelectUseType;
component.commonBeQueryParam = newCommonBeQueryParam;
component.opposite = newOpposite;
ReplaceComponent(index, component);
}
public void RemoveFaction() {
RemoveComponent(CombatComponentsLookup.Faction);
}
}
//------------------------------------------------------------------------------
//
// 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 _matcherFaction;
public static Entitas.IMatcher Faction {
get {
if (_matcherFaction == null) {
var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.Faction);
matcher.componentNames = CombatComponentsLookup.componentNames;
_matcherFaction = matcher;
}
return _matcherFaction;
}
}
}