IEnumerator st() { yield return(new WaitForSeconds(2.5f)); gameBall = (GameObject)Instantiate(ball, new Vector3(9.711f, 0.825f, 7.741f), Quaternion.identity); bm = gameBall.GetComponent <Bowlingball>(); gamePins = (GameObject)Instantiate(pins, new Vector3(5.39f, 0.72f, 7.87f), Quaternion.identity); pm = gamePins.GetComponent <Pins>(); }
IEnumerator Timedelay() { yield return(new WaitForSeconds(3f)); score.SetActive(true); pm.check = true; yield return(new WaitForSeconds(0.5f)); gameScore += pm.score; yield return(new WaitForSeconds(2.2f)); score.SetActive(false); gameBall = (GameObject)Instantiate(ball, new Vector3(9.711f, 0.825f, 7.741f), Quaternion.identity); bm = gameBall.GetComponent <Bowlingball>(); gamePins = (GameObject)Instantiate(pins, new Vector3(5.39f, 0.72f, 7.87f), Quaternion.identity); pm = gamePins.GetComponent <Pins>(); }