Exemple #1
0
        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);
        }