//------------------------------------------------------------------------------ // // 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.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); } } //------------------------------------------------------------------------------ // // 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 _matcherGunData; public static Entitas.IMatcher GunData { get { if (_matcherGunData == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.GunData); matcher.componentNames = CombatComponentsLookup.componentNames; _matcherGunData = matcher; } return _matcherGunData; } } }