Пример #1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.tag == "CanonStart")
     {
         Debug.Log("start");
         foreach (GameObject Can in canons)
         {
             Canon canScript = Can.GetComponent <Canon>();
             canScript.spawnStart = true;
             rb.freezeRotation    = true;
         }
     }
     if (col.gameObject.name == "ColliderTest")
     {
         Debug.Log("HIT!");
     }
 }