Esempio n. 1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "Player")
     {
         Destroy(col.gameObject);
         if (cg != null)
         {
             cg.SpawnNewBall();
         }
     }
 }
Esempio n. 2
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "Player")
     {
         Debug.Log("Score 1");
         Destroy(gameObject);
         Destroy(col.gameObject);
         if (cg != null)
         {
             cg.SpawnNewBall();
             sm.IncrementScore();
         }
     }
 }