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
3.0 KiB
64 lines
3.0 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.BeAttractedComponent beAttracted { get { return (CoreGame.Render.BeAttractedComponent)GetComponent(CombatComponentsLookup.BeAttracted); } }
|
|
public bool hasBeAttracted { get { return HasComponent(CombatComponentsLookup.BeAttracted); } }
|
|
|
|
public void AddBeAttracted(int newAttractorEid, UnityEngine.Vector2 newStartPos, float newStartScale, float newTargetScale, float newDuration) {
|
|
var index = CombatComponentsLookup.BeAttracted;
|
|
var component = (CoreGame.Render.BeAttractedComponent)CreateComponent(index, typeof(CoreGame.Render.BeAttractedComponent));
|
|
component.attractorEid = newAttractorEid;
|
|
component.startPos = newStartPos;
|
|
component.startScale = newStartScale;
|
|
component.targetScale = newTargetScale;
|
|
component.duration = newDuration;
|
|
AddComponent(index, component);
|
|
}
|
|
|
|
public void ReplaceBeAttracted(int newAttractorEid, UnityEngine.Vector2 newStartPos, float newStartScale, float newTargetScale, float newDuration) {
|
|
var index = CombatComponentsLookup.BeAttracted;
|
|
var component = (CoreGame.Render.BeAttractedComponent)CreateComponent(index, typeof(CoreGame.Render.BeAttractedComponent));
|
|
component.attractorEid = newAttractorEid;
|
|
component.startPos = newStartPos;
|
|
component.startScale = newStartScale;
|
|
component.targetScale = newTargetScale;
|
|
component.duration = newDuration;
|
|
ReplaceComponent(index, component);
|
|
}
|
|
|
|
public void RemoveBeAttracted() {
|
|
RemoveComponent(CombatComponentsLookup.BeAttracted);
|
|
}
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <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> _matcherBeAttracted;
|
|
|
|
public static Entitas.IMatcher<CombatEntity> BeAttracted {
|
|
get {
|
|
if (_matcherBeAttracted == null) {
|
|
var matcher = (Entitas.Matcher<CombatEntity>)Entitas.Matcher<CombatEntity>.AllOf(CombatComponentsLookup.BeAttracted);
|
|
matcher.componentNames = CombatComponentsLookup.componentNames;
|
|
_matcherBeAttracted = matcher;
|
|
}
|
|
|
|
return _matcherBeAttracted;
|
|
}
|
|
}
|
|
}
|
|
|