コード例 #1
0
 private void OnTriggerEnter(Collider other)
 {
     Debug.Log(other.tag);
     if (other.tag == "Player")
     {
         for (int i = 0; i < enemiesToCall.Length; i++)
         {
             MoveTo enemyScipt = enemiesToCall[i].GetComponent <MoveTo>();
             enemyScipt.CameraTriggered(gameObject);
             Debug.Log("triggered 2");
         }
         Renderer rend = gameObject.GetComponent <Renderer>();
         rend.material = red;
     }
 }