Beispiel #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Worker" || other.tag == "Ore" || other.tag == "EnergyCrystal" || other.tag == "Rubble")
     {
         Debug.Log("Checkpoint reached");
         if (_tutorial.CheckpointReached(this, other.tag))
         {
             //    GetComponent<Collider>().enabled = false;
             Collider[] childCollider = GetComponentsInChildren <Collider>();
             for (int i = 0; i < childCollider.Length; i++)
             {
                 childCollider[i].enabled = false;
             }
         }
     }
 }