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.
64 lines
2.9 KiB
64 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.GunDataComponent gunData { get { return (CoreGame.Render.GunDataComponent)GetComponent(CombatComponentsLookup.GunData); } }
|
|
public bool hasGunData { get { return HasComponent(CombatComponentsLookup.GunData); } }
|
|
|
|
public void AddGunData(int newGunCfgId, int newSlotId, CombatEntity newGunEnt, ElementType newElementType, bool newIsShowAttackRange) {
|
|
var index = CombatComponentsLookup.GunData;
|
|
var component = (CoreGame.Render.GunDataComponent)CreateComponent(index, typeof(CoreGame.Render.GunDataComponent));
|
|
component.gunCfgId = newGunCfgId;
|
|
component.slotId = newSlotId;
|
|
component.gunEnt = newGunEnt;
|
|
component.elementType = newElementType;
|
|
component.isShowAttackRange = newIsShowAttackRange;
|
|
AddComponent(index, component);
|
|
}
|
|
|
|
public void ReplaceGunData(int newGunCfgId, int newSlotId, CombatEntity newGunEnt, ElementType newElementType, bool newIsShowAttackRange) {
|
|
var index = CombatComponentsLookup.GunData;
|
|
var component = (CoreGame.Render.GunDataComponent)CreateComponent(index, typeof(CoreGame.Render.GunDataComponent));
|
|
component.gunCfgId = newGunCfgId;
|
|
component.slotId = newSlotId;
|
|
component.gunEnt = newGunEnt;
|
|
component.elementType = newElementType;
|
|
component.isShowAttackRange = newIsShowAttackRange;
|
|
ReplaceComponent(index, component);
|
|
}
|
|
|
|
public void RemoveGunData() {
|
|
RemoveComponent(CombatComponentsLookup.GunData);
|
|
}
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <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> _matcherGunData;
|
|
|
|
public static Entitas.IMatcher<CombatEntity> GunData {
|
|
get {
|
|
if (_matcherGunData == null) {
|
|
var matcher = (Entitas.Matcher<CombatEntity>)Entitas.Matcher<CombatEntity>.AllOf(CombatComponentsLookup.GunData);
|
|
matcher.componentNames = CombatComponentsLookup.componentNames;
|
|
_matcherGunData = matcher;
|
|
}
|
|
|
|
return _matcherGunData;
|
|
}
|
|
}
|
|
}
|
|
|