Exemplo n.º 1
0
    private IEnumerator RandomDaziRoutine()
    {
        WaitForFixedUpdate frame = new WaitForFixedUpdate();

        mRandomDaziClicktime = 0;

        while (mRandomDaziClicktime == 0)
        {
            StartCoroutine(RandomDaziClickTimeCheck());
            yield return(frame);
        }

        if (mRandomDaziClicktime >= mUser.RandomDaziFinishTime)
        {
            mUser.RandomDaziFinishTime = mRandomDaziClicktime + RandomDaziCoolTime;
            mUser.RandomDaziCount--;
        }
        ShowRandomDaziText(false);
        double cooltime = mUser.RandomDaziFinishTime - mRandomDaziClicktime;

        PointRandomDaziButton.gameObject.SetActive(false);
        while (cooltime >= 0)
        {
            yield return(frame);

            cooltime -= Time.deltaTime;
            RandomDaziButton.ShowCooltime((float)cooltime, RandomDaziCoolTime);
        }
        ShowRandomDaziText(true);
    }