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