public AsyncPathfindStore(NavigationNode start, NavigationNode end, bool permitChasmCrossing, PathResultDelegate callBack) { Start = start; End = end; PermitCrossing = permitChasmCrossing; Callback = callBack; }
// ReSharper disable once InconsistentNaming private TResult GetPathResult <TResult>(PathResultDelegate <TResult> callback) => callback(_path);
public void AsynchronousFindPath(NavigationNode startNode, NavigationNode endNode, bool permitChasmCrossing, PathResultDelegate callBack) { AsyncPathfindStore store = new AsyncPathfindStore(startNode, endNode, permitChasmCrossing, callBack); outstandingRequests.Add(store); //callBack(FindPath(startNode, endNode, permitChasmCrossing)); }