示例#1
0
    public void AddMove(Vector2 move)
    {
        lenght++;

        lastPosition = FindWayAlgo.SumVector3Vector2(lastPosition, move);

        points.Add(lastPosition);
    }
示例#2
0
    public Way(Vector2 move, Way _way)
    {
        lenght        = _way.lenght;
        startPosition = _way.startPosition;
        lastPosition  = _way.lastPosition;

        lastMove = move;

        points = new List <Vector2>();
        for (int index = 0; index < _way.points.Count; index++)
        {
            points.Add(_way.points[index]);
        }


        lenght++;
        lastPosition = FindWayAlgo.SumVector3Vector2(lastPosition, move);

        points.Add(lastPosition);
    }