Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private bool waitCheck = true;
- IEnumerator waitFiveSeconds()
- {
- if (waitCheck)
- {
- waitCheck = false;
- yield return new WaitForSeconds(5);
- waitCheck = true;
- }
- Debug.Log("im waiting for five");
- }
- void Start ()
- {
- while (Ball.gameScore > 0)
- {
- int randomNum = Random.Range(0, 10);
- Debug.Log("Number " + (randomNum + 1).ToString());
- GetComponent<Text>().text = scoreTextList[randomNum];
- StartCoroutine("waitFiveSeconds");
- Ball.gameScore--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement