|
|
|
|
|
|
playerScores[playerID]++; |
|
|
|
player0Text.text = playerScores[0].ToString(); |
|
|
|
player1Text.text = playerScores[1].ToString(); |
|
|
|
StartCoroutine(CountdownAndSpawnBall()); |
|
|
|
//StartCoroutine(CountdownAndSpawnBall());
|
|
|
|
} |
|
|
|
|
|
|
|
IEnumerator CountdownAndSpawnBall() |
|
|
|
|
|
|
|
|
|
|
mainText.text = ""; |
|
|
|
|
|
|
|
SpawnBall(); |
|
|
|
InvokeRepeating("SpawnBall", 0f, .01f); |
|
|
|
} |
|
|
|
|
|
|
|
void SpawnBall() |
|
|
|