コード例 #1
0
        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);
            }
        }
コード例 #2
0
 protected override Point GetTarget()
 {
     idleFx?.Play(this.transform.position);
     return(AIUtils.GetWeakestTarget(this.Unit.UnitsMap));
 }