GetNode() public abstract method

Gets child node at index.
public abstract GetNode ( int i ) : ANode
i int Index of child node to get.
return ANode
コード例 #1
0
 private bool IsConnected(AFlowNode from, AFlowNode to)
 {
     for (int i = 0; i < to.NodeCount; ++i)
     {
         var n = to.GetNode(i) as AFlowNode;
         if (n != null)
         {
             if (from == n || IsConnected(from, n))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
コード例 #2
0
ファイル: AiTree.cs プロジェクト: marekdaniluk/lab
 private bool IsConnected(AFlowNode from, AFlowNode to)
 {
     for (int i = 0; i < to.NodeCount; ++i) {
         var n = to.GetNode(i) as AFlowNode;
         if (n != null) {
             if (from == n || IsConnected(from, n)) {
                 return true;
             }
         }
     }
     return false;
 }