Esempio n. 1
0
 public void ConsiderObjectsWithTag(string tag, bool setID)
 {
     GameObject[] intObjs = GameObject.FindGameObjectsWithTag(tag);
     foreach (GameObject obj in intObjs)
     {
         IHaveID inter = obj.GetComponent <IHaveID>();
         if (inter != null)
         {
             if (setID)
             {
                 inter.SetID(intObjects.Count);
             }
             intObjects.Add(obj);
         }
     }
 }