public void Follow(StartPoint.PointType pointType)
    {
        if (OnlyUsedOnce && isUsed)
        {
            return;
        }

        if (pointType == StartPoint.PointType.Start)
        {
            rate      = 0;
            fromStart = true;
        }
        else if (pointType == StartPoint.PointType.End)
        {
            rate      = spline.nodes.Count - 1;
            fromStart = false;
        }

        StartFollowing();
    }
Exemple #2
0
    public void Follow(StartPoint.PointType pointType)
    {
        if (OnlyUsedOnce && isUsed)
        {
            return;
        }
        if (movementController == null)
        {
            movementController = FindObjectOfType <MovementController>();
        }
        movementController.IsFuseMoving = true;

        if (pointType == StartPoint.PointType.Start)
        {
            StartCoroutine(FuseRoutine(endPt.position));
        }
        else if (pointType == StartPoint.PointType.End)
        {
            StartCoroutine(FuseRoutine(startPt.position));
        }
    }