Example #1
0
    private IEnumerator CheckIfEnabled()
    {
        if (!rubbishCamera.activeSelf)
        {
            yield return(new WaitUntil(() => rubbishCamera.activeSelf));
        }
        scanRubbish.Init();
        yield return(new WaitForSeconds(2));

        scanRubbish.Play();
    }
Example #2
0
    private IEnumerator ShowTextMessage()
    {
        if (isVibrationOn)
        {
            Handheld.Vibrate();
        }
        if (isSfxOn)
        {
            musicController.globalAudioSource.PlayOneShot(musicController.rubbishCollectedSound);
        }
        messageText.text       = "WELL DONE! You helped the environment!!!";
        fillerImage.fillAmount = 0;
        yield return(new WaitForSeconds(2));

        FindObjectOfType <SpawnOnMap>().BatEffect(); //Bat appeared on map - effect

        messageText.text = "Please scan another rubbish!!!";
        barcodeDetected  = false;
        timeLeft         = 10f;
        anim.SetBool("fill", true);
        scanRubbish.Play();
    }