public TargetSearchWanderingState(UnitAIWithTarget ai, Vector2 searchPoint, bool runAlongTargetVelocity) : base(0.25f) { this.ai = ai; this.searchPoint = searchPoint; this.runAlongTargetVelocity = runAlongTargetVelocity; this.hasCheckedSearchPoint = false; }
public DamagedNewTargetSearchState(UnitAIWithTarget ai) : base(ai) { }
public DamagedState(UnitAIWithTarget ai, Vector2 hitNormal) : base(Random.Range(0.2f, 0.4f)) { this.ai = ai; this.hitNormal = hitNormal; }
public TargetSearchState(UnitAIWithTarget ai, Quaternion lookAt) : this(ai) { destAngle = lookAt.eulerAngles.z; }
public TargetSearchState(UnitAIWithTarget ai) : base(interval: 1f) { this.ai = ai; }
/*public Unit GetClosestTarget(Vector2 position) { * //Vector2 position = requester.owner.position; * var fact = GetClosest * return fact?.unit; * }*/ private static Unit GetAnyTarget(IEnumerable <UnitAIWithTarget> among, out UnitAIWithTarget witness) { witness = among.FirstOrDefault(x => x.target.Is()); return(witness?.target); }
public ZombiePursuingTarget(UnitAIWithTarget ai) : base(interval: 0.2f) { this.ai = ai; }