Exemple #1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Ball" && gameObject.name == "Goal_L")
     {
         scoreController.AddScoreL();
     }
     if (other.gameObject.tag == "Ball" && gameObject.name == "Goal_R")
     {
         scoreController.AddScoreR();
     }
 }