Exemplo n.º 1
0
 public void ReachTarget(Target tar)
 {
     logic.ReachTarget(tar);
 }
Exemplo n.º 2
0
        public void ReachTarget(Target tar)
        {
            curTar = tar;
            curTar.color = "Lime";

            CalcDistanceToCurrentTarget();
            Direction dir = ChooseDirectionToCurrentTarget();

            while (dir != null)
            {
                AttemptMove(dir);
                dir = ChooseDirectionToCurrentTarget();
            }

            curTar.color = "Green";
        }