UnitMovement.OnPathComplete C# (CSharp) Method

OnPathComplete() public method

public OnPathComplete ( Path, p ) : void
p Path,
return void
    public void OnPathComplete(Path p)
    {
        p.Claim (this);
        if (!p.error) {
            if (path != null) path.Release (this);
            path = p;
            //Reset the waypoint counter
            currentWaypoint = 0;
            currentPathCount = path.vectorPath.Count;
        } else {
            p.Release (this);
            Debug.Log ("The target was not reachable: "+p.errorLog);
        }
    }