示例#1
0
        public void ApplyPath(List <System.Drawing.Point> path)
        {
            Console.WriteLine(path.Count);
            if (path.Count > 0 && path.Count < _trajet._count - 1)
            {
                _trajet._vide = true;
                _trajet._trajet.Clear();

                _trajet.AddChemin(new Vector2(path[0].X * _ecart._x + _mapPosStart, path[0].Y * _ecart._y));
                foreach (System.Drawing.Point curr in path)
                {
                    _trajet.AddChemin(new Vector2(curr.X * _ecart._x + _mapPosStart, curr.Y * _ecart._y));
                }
            }
            else if (path.Count == 0)
            {
                _trajet.Clear();
            }
        }