//------------------------------------------------------------------------------ // // 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.AimTargetComponent aimTarget { get { return (CoreGame.Render.AimTargetComponent)GetComponent(CombatComponentsLookup.AimTarget); } } public bool hasAimTarget { get { return HasComponent(CombatComponentsLookup.AimTarget); } } public void AddAimTarget(UnityEngine.Vector2 newTargetPos, int newTargetEid, float newResetTime, BindPointType newRotationCtrl, int newRotationEid, bool newRotationEntChangeDir, UnityEngine.Vector2 newGunAimForwardDir) { var index = CombatComponentsLookup.AimTarget; var component = (CoreGame.Render.AimTargetComponent)CreateComponent(index, typeof(CoreGame.Render.AimTargetComponent)); component.targetPos = newTargetPos; component.targetEid = newTargetEid; component.resetTime = newResetTime; component.rotationCtrl = newRotationCtrl; component.rotationEid = newRotationEid; component.rotationEntChangeDir = newRotationEntChangeDir; component.gunAimForwardDir = newGunAimForwardDir; AddComponent(index, component); } public void ReplaceAimTarget(UnityEngine.Vector2 newTargetPos, int newTargetEid, float newResetTime, BindPointType newRotationCtrl, int newRotationEid, bool newRotationEntChangeDir, UnityEngine.Vector2 newGunAimForwardDir) { var index = CombatComponentsLookup.AimTarget; var component = (CoreGame.Render.AimTargetComponent)CreateComponent(index, typeof(CoreGame.Render.AimTargetComponent)); component.targetPos = newTargetPos; component.targetEid = newTargetEid; component.resetTime = newResetTime; component.rotationCtrl = newRotationCtrl; component.rotationEid = newRotationEid; component.rotationEntChangeDir = newRotationEntChangeDir; component.gunAimForwardDir = newGunAimForwardDir; ReplaceComponent(index, component); } public void RemoveAimTarget() { RemoveComponent(CombatComponentsLookup.AimTarget); } } //------------------------------------------------------------------------------ // // 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 _matcherAimTarget; public static Entitas.IMatcher AimTarget { get { if (_matcherAimTarget == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.AimTarget); matcher.componentNames = CombatComponentsLookup.componentNames; _matcherAimTarget = matcher; } return _matcherAimTarget; } } }