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.
62 lines
2.9 KiB
62 lines
2.9 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.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);
|
|
}
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <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> _matcherFaction;
|
|
|
|
public static Entitas.IMatcher<CombatEntity> Faction {
|
|
get {
|
|
if (_matcherFaction == null) {
|
|
var matcher = (Entitas.Matcher<CombatEntity>)Entitas.Matcher<CombatEntity>.AllOf(CombatComponentsLookup.Faction);
|
|
matcher.componentNames = CombatComponentsLookup.componentNames;
|
|
_matcherFaction = matcher;
|
|
}
|
|
|
|
return _matcherFaction;
|
|
}
|
|
}
|
|
}
|
|
|