Beispiel #1
0
 private IEnumerator JUICEIT(JuicePouch jp)
 {
     juicin = true;
     poolParticles.Play();
     fillAudio.pitch = 0.6f;
     fillAudio.Play();
     while (juicin && jp.getCurrentJuiceAmount() > 0)
     {
         fillAudio.pitch += 0.006f;
         jp.RemoveJuice(juiceFillRate * Time.deltaTime);
         addToPool(juiceFillRate * pouchToPoolConversionRate * Time.deltaTime);
         yield return(null);
     }
     poolParticles.Stop();
     fillAudio.Stop();
     juicin = false;
 }
Beispiel #2
0
    private void Awake()
    {
        fillAudio = GameObject.Find("FillAudio").GetComponent <AudioSource>();
        poolParticles.Stop();
        juicePouch = FindObjectOfType <JuicePouch>();
        handlePoolHeight();

        if (endOfGameScreenText == null)
        {
            Debug.LogError("Need to hook up end of game screen");
        }
        if (endOfGameScreenTextBacker == null)
        {
            Debug.LogError("Need to hook up end of game screen");
        }
        if (endOfGameScreenAnimator == null)
        {
            Debug.LogError("Need to hook up end of game screen animator");
        }
    }