Пример #1
0
 public void StarReadout()
 {
     for (int i = 0; i < transform.childCount; i++)
     {
         Transform  child = transform.GetChild(i);
         NodeMapper nm    = child.GetComponent <NodeMapper>();
         if (nm != null)
         {
             string str = nm.name + ": " + (nm.IsCorrectConnections() ? "Correct" : "Incorrect");
             Debug.Log(str);
         }
     }
 }
Пример #2
0
    public bool CheckForSuccess()
    {
        int count = 0;

        //foreach (Transform child in transform)
        for (int i = 0; i < transform.childCount; i++)
        {
            Transform  child = transform.GetChild(i);
            NodeMapper nm    = child.GetComponent <NodeMapper>();
            if (nm != null)
            {
                if (nm.IsCorrectConnections())
                {
                    count++;
                }
            }
        }
        Debug.Log(count + " / " + transform.childCount);
        return(count == transform.childCount);
    }