Example #1
0
    /// <summary>
    /// Gets the remaining distance on pathway.
    /// </summary>
    /// <returns>The remaining path.</returns>
    public float GetRemainingPath()
    {
        Vector2 distance = destination.transform.position - transform.position;

        return(distance.magnitude + path.GetPathDistance(destination));
    }