コード例 #1
0
 protected override void OnAwake()
 {
     AITreeNode[] treeNodes = new AITreeNode[transform.childCount];
     base.OnAwake();
     for (int nodeEnumIdx = 0; nodeEnumIdx < treeNodes.Length; ++nodeEnumIdx)
     {
         AITreeNode node = transform.GetChild(nodeEnumIdx).GetComponent <AITreeNode>();
         treeNodes[nodeEnumIdx] = node;
     }
     m_Nodes = new List <AITreeNode>();
     m_Nodes.AddRange(treeNodes);
 }
コード例 #2
0
 private void Awake()
 {
     startNode = transform.GetChild(0).GetComponent <AITreeNode>();
     npc       = transform.parent.GetComponent <BaseActor>();
 }