コード例 #1
0
ファイル: MapStuff.cs プロジェクト: Kharzette/GrogTest
        internal void LoadPathing(string path)
        {
            mbBusy = true;
            mGraph = PathGraph.CreatePathGrid();

            mGraph.Load(path);

            mPathDraw.BuildDrawInfo(mGraph);

            mbBusy = false;

            Misc.SafeInvoke(ePickReady, true);
        }
コード例 #2
0
ファイル: MapStuff.cs プロジェクト: Kharzette/GrogTest
        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);
        }