private void MoveToWeakestTarget() { //// Logcat.I("There is not enemy to avoid, moving to weakest target"); Point unit = AIUtils.GetWeakestTarget(this.Unit.UnitsMap); if (unit != default) { Dictionary <Point, List <Point> > allPaths = AIUtils.GetAllPaths(this.Board, this.Unit.UnitsMap, this.Unit.GetPosition(), true); AIPlacementHelper.MoveToTarget(this, allPaths, this.Unit, this.Range, unit); } }
protected override Point GetTarget() { idleFx?.Play(this.transform.position); return(AIUtils.GetWeakestTarget(this.Unit.UnitsMap)); }