void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.name == "Goal_Left") { gameMan.GoalScore(2); ball.velocity = Vector2.zero; if (gameMan.botScore < 3) { Reset(); } } else if (col.gameObject.name == "Goal_Right") { gameMan.GoalScore(1); ball.velocity = Vector2.zero; if (gameMan.playerScore < 3) { Reset(); } } }