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.
56 lines
2.1 KiB
56 lines
2.1 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 {
|
|
|
|
static readonly CoreGame.Render.PartnerComponent partnerComponent = new CoreGame.Render.PartnerComponent();
|
|
|
|
public bool isPartner {
|
|
get { return HasComponent(CombatComponentsLookup.Partner); }
|
|
set {
|
|
if (value != isPartner) {
|
|
var index = CombatComponentsLookup.Partner;
|
|
if (value) {
|
|
var componentPool = GetComponentPool(index);
|
|
var component = componentPool.Count > 0
|
|
? componentPool.Pop()
|
|
: partnerComponent;
|
|
|
|
AddComponent(index, component);
|
|
} else {
|
|
RemoveComponent(index);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <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> _matcherPartner;
|
|
|
|
public static Entitas.IMatcher<CombatEntity> Partner {
|
|
get {
|
|
if (_matcherPartner == null) {
|
|
var matcher = (Entitas.Matcher<CombatEntity>)Entitas.Matcher<CombatEntity>.AllOf(CombatComponentsLookup.Partner);
|
|
matcher.componentNames = CombatComponentsLookup.componentNames;
|
|
_matcherPartner = matcher;
|
|
}
|
|
|
|
return _matcherPartner;
|
|
}
|
|
}
|
|
}
|
|
|