Esempio n. 1
0
    private IEnumerator LaunchBall()
    {
        for (int i = 3; i > 0; i--)
        {
            countText.text = i.ToString();
            yield return(_waitFor1Sec);
        }
        countText.text = string.Empty;

        ball.transform.localPosition = Vector3.zero;
        ball.Launch(new Vector2(Random.Range(-1f, 1f), Random.Range(-1f, 1f)), Random.Range(1f, 10f));
    }