Ejemplo n.º 1
0
    IEnumerator BallCountTextShow(int greenBallCount)
    {
        //초록공 합쳐지기 전후 공 개수 보여주기
        BallCountTextObj.transform.position = new Vector3(Mathf.Clamp(veryFirstPos.x, -49.9f, 49.9f), -65, 0);
        BallCountText.text = "x" + BallGroup.childCount.ToString();

        yield return(new WaitForSeconds(0.17f));

        if (BallGroup.childCount > score)
        {
            Destroy(BallGroup.GetChild(BallGroup.childCount - 1).gameObject);
        }
        BallCountText.text = "x" + BallGroup.childCount.ToString();

        // 바닥에 떨어진 초록공 +로 표시하기
        if (greenBallCount != 0)
        {
            BallPlusTextObj.SetActive(true);
            BallPlusTextObj.transform.position = new Vector3(Mathf.Clamp(veryFirstPos.x, -49.9f, 49.9f), -47, 0);
            BallPlusText.text = "+" + greenBallCount.ToString();
            S_Plus.Play();

            yield return(new WaitForSeconds(0.5f));

            BallPlusTextObj.SetActive(false);
        }
    }
Ejemplo n.º 2
0
    IEnumerator BallCountTextShow(int greenBallCount)
    {
        BallCountTextObj.transform.position = new Vector3(Mathf.Clamp(veryFirstPos.x, -49.9f, 49.9f), -65, 0);
        BallCountText.text = "x" + BallGroup.childCount.ToString();

        yield return(new WaitForSeconds(0.17f));

        if (greenBallCount != 0)
        {
            BallPlusTextObj.SetActive(true);
            BallPlusTextObj.transform.position = new Vector3(Mathf.Clamp(veryFirstPos.x, -49.9f, 49.9f), -47, 0);
            BallPlusText.text = "+" + greenBallCount.ToString();
            S_Plus.Play();

            yield return(new WaitForSeconds(0.5f));

            BallPlusTextObj.SetActive(false);
        }
    }