Beispiel #1
0
        private clsPassageNodeNework MakePassageNodeNetwork()
        {
            clsPassageNodeNework ReturnResult = new clsPassageNodeNework();
            PathfinderConnection NewConnection;
            clsNodeTag NodeTag = default(clsNodeTag);
            PathfinderNode tmpNodeA = default(PathfinderNode);
            PathfinderNode tmpNodeB = default(PathfinderNode);
            int A = 0;
            int B = 0;

            ReturnResult.Network = new PathfinderNetwork();
            ReturnResult.PassageNodePathNodes = new PathfinderNode[SymmetryBlockCount, PassageNodeCount];
            for ( A = 0; A <= PassageNodeCount - 1; A++ )
            {
                for ( B = 0; B <= SymmetryBlockCount - 1; B++ )
                {
                    ReturnResult.PassageNodePathNodes[B, A] = new PathfinderNode(ReturnResult.Network);
                    NodeTag = new clsNodeTag();
                    NodeTag.Pos = PassageNodes[B, A].Pos;
                    ReturnResult.PassageNodePathNodes[B, A].Tag = NodeTag;
                }
            }
            for ( A = 0; A <= ConnectionCount - 1; A++ )
            {
                if ( Connections[A].PassageNodeA.Level == Connections[A].PassageNodeB.Level || Connections[A].IsRamp )
                {
                    if ( !(Connections[A].PassageNodeA.IsWater || Connections[A].PassageNodeB.IsWater) )
                    {
                        tmpNodeA = ReturnResult.PassageNodePathNodes[Connections[A].PassageNodeA.MirrorNum, Connections[A].PassageNodeA.Num];
                        tmpNodeB = ReturnResult.PassageNodePathNodes[Connections[A].PassageNodeB.MirrorNum, Connections[A].PassageNodeB.Num];
                        NewConnection = tmpNodeA.CreateConnection(tmpNodeB, GetNodePosDist(tmpNodeA, tmpNodeB));
                    }
                }
            }
            ReturnResult.Network.LargeArraysResize();
            ReturnResult.Network.FindCalc();

            return ReturnResult;
        }
Beispiel #2
0
 private clsPassageNodeNework MakePassageNodeNetwork()
 {
     int num;
     clsPassageNodeNework nework2 = new clsPassageNodeNework {
         Network = new PathfinderNetwork(),
         PassageNodePathNodes = new PathfinderNode[(this.SymmetryBlockCount - 1) + 1, (this.PassageNodeCount - 1) + 1]
     };
     int num3 = this.PassageNodeCount - 1;
     for (num = 0; num <= num3; num++)
     {
         int num4 = this.SymmetryBlockCount - 1;
         for (int i = 0; i <= num4; i++)
         {
             nework2.PassageNodePathNodes[i, num] = new PathfinderNode(nework2.Network);
             clsNodeTag tag = new clsNodeTag {
                 Pos = this.PassageNodes[i, num].Pos
             };
             nework2.PassageNodePathNodes[i, num].Tag = tag;
         }
     }
     int num5 = this.ConnectionCount - 1;
     for (num = 0; num <= num5; num++)
     {
         if (((this.Connections[num].PassageNodeA.Level == this.Connections[num].PassageNodeB.Level) | this.Connections[num].IsRamp) && !(this.Connections[num].PassageNodeA.IsWater | this.Connections[num].PassageNodeB.IsWater))
         {
             PathfinderNode nodeA = nework2.PassageNodePathNodes[this.Connections[num].PassageNodeA.MirrorNum, this.Connections[num].PassageNodeA.Num];
             PathfinderNode otherNode = nework2.PassageNodePathNodes[this.Connections[num].PassageNodeB.MirrorNum, this.Connections[num].PassageNodeB.Num];
             PathfinderConnection connection = nodeA.CreateConnection(otherNode, this.GetNodePosDist(nodeA, otherNode));
         }
     }
     nework2.Network.LargeArraysResize();
     nework2.Network.FindCalc();
     return nework2;
 }
Beispiel #3
0
        private clsPassageNodeNework MakePassageNodeNetwork()
        {
            var ReturnResult = new clsPassageNodeNework();
            var NodeTag = default(clsNodeTag);
            var A = 0;
            var B = 0;

            ReturnResult.Network = new PathfinderNetwork();
            ReturnResult.PassageNodePathNodes = new PathfinderNode[SymmetryBlockCount, PassageNodeCount];
            for ( A = 0; A <= PassageNodeCount - 1; A++ )
            {
                for ( B = 0; B <= SymmetryBlockCount - 1; B++ )
                {
                    ReturnResult.PassageNodePathNodes[B, A] = new PathfinderNode(ReturnResult.Network);
                    NodeTag = new clsNodeTag();
                    NodeTag.Pos = PassageNodes[B, A].Pos;
                    ReturnResult.PassageNodePathNodes[B, A].Tag = NodeTag;
                }
            }
            ReturnResult.Network.LargeArraysResize();
            ReturnResult.Network.FindCalc();

            return ReturnResult;
        }