Esempio n. 1
0
    public void score_tambah()
    {
        scriptRingIn = GameObject.Find("ring_in").GetComponent <sc_ringin>();

        //stat3Point
        sc_waktu scriptWaktu = GameObject.Find("txtWaktu").GetComponent <sc_waktu>();

        if (scriptWaktu.waktu_main > 0)
        {
            if (scriptWaktu.stat3Point == false)
            {
                //score+=2+scriptRingIn.tambahPoint;
                score += 2;
            }
            else
            {
                //score+=3+scriptRingIn.tambahPoint;
                score += 3;
            }
        }
        //this.guiText.text = score_empat_digit(score);
        textScore.text = score_empat_digit(score);
    }
Esempio n. 2
0
    void update_status_masuk()
    {
        statMasuk = true;
        sc_ringin scriptRingin = GameObject.Find("ring_in").GetComponent <sc_ringin> ();

        if (PlayerPrefs.GetInt(PlayerPrefHandler.keySound) == 1)
        {
            GetComponent <AudioSource>().PlayOneShot(soBolaMasuk, 10f);
        }
        //Debug.Log ("Combo Masukkk ::::::::::: " + scriptRingin.comboMasuk);
        if (scriptRingin.comboMasuk == 1)
        {
            this.gameObject.GetComponent <TrailRenderer> ().enabled = true;
            if (PlayerPrefs.GetInt(PlayerPrefHandler.keySound) == 1)
            {
                GetComponent <AudioSource>().PlayOneShot(soExplode, 5f);
            }
            GameObject.Find("objSound_say").SendMessage("say_combo");
        }
        else
        {
            GameObject.Find("objSound_say").SendMessage("say_praise");
        }
    }