internal void LoadPathing(string path) { mbBusy = true; mGraph = PathGraph.CreatePathGrid(); mGraph.Load(path); mPathDraw.BuildDrawInfo(mGraph); mbBusy = false; Misc.SafeInvoke(ePickReady, true); }
internal void GeneratePathing(int gridSize, float error) { mbBusy = true; mGraph = PathGraph.CreatePathGrid(); mErrorAmount = error; mGraph.GenerateGraph(mZone.GetWalkableFaces, gridSize, Zone.StepHeight, MobileCanReach, MobileIsValid); mPathDraw.BuildDrawInfo(mGraph); mbBusy = false; int numNodes, numCons, avgCon; mGraph.GetStats(out numNodes, out numCons, out avgCon); mST.ModifyStringText(mFonts[0], "PathGraph Nodes: " + numNodes + ", Connections: " + numCons + ", Average Connections per Node: " + avgCon, "PathStatus"); Misc.SafeInvoke(ePickReady, true); }