PawnController.MoveTo C# (CSharp) Method

MoveTo() public method

public MoveTo ( Vector3 target, ContinueWith nextFn ) : void
target Vector3
nextFn ContinueWith
return void
    public void MoveTo(Vector3 target, ContinueWith nextFn)
    {
        currentPathToWalk = pathfinder.GetPath(new Vector2(gameObject.transform.position.x, gameObject.transform.position.y), new Vector2(target.x, target.y));
        currentPathToWalkIndex = 0;
        MoveToInternal(currentPathToWalk[0], () =>
        {
            InternalMoveContinueWith(nextFn);
        });
    }