Exemplo n.º 1
0
    private void ProcessScale()
    {
        gauge_bg.fillAmount = (float)count / (threshould * level);
        if (count >= threshould * level)
        {
            if (SystemInfo.supportsVibration)
            {
                Handheld.Vibrate();
            }

            this.GetComponent <AudioSource>().pitch = 1.0f;
            this.GetComponent <AudioSource>().PlayOneShot(ChargedSE, 1.0f);

            likeManager.DoTransition();
        }
        else if ((count / threshould) > current_lv)
        {
            current_lv++;
            this.GetComponent <AudioSource>().pitch = 1.0f + current_lv * Pitch_diff;
            this.GetComponent <AudioSource>().PlayOneShot(FillingSE, 1.0f);
        }
    }