Exemple #1
0
 void Bounds()
 {
     if (transform.position.x > 8.5f)
     {
         score = 1;
         scoreController.AddScoreToPlayer1();
         StartCoroutine(StartOverAgain());
     }
     else if (transform.position.x < -8.5f)
     {
         score = 0;
         scoreController.AddScoreToEnemy();
         StartCoroutine(StartOverAgain());
     }
 }