Exemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D collider)
 {
     if (collider.name == "Player")
     {
         music.fadeSourceOut(0.0001f);
         sound.playSound("pick");
         dogObject.GetComponent <SpriteRenderer>().enabled = false;
         dogObject.GetComponent <BoxCollider2D>().enabled  = false;
         StartCoroutine(transitionToEnd());
     }
 }
Exemplo n.º 2
0
    void Update()
    {
        if (title.activeInHierarchy && inScene == false && delay == true)
        {
            StartCoroutine(startPlay());
        }

        if (Input.GetKey("z") && inputs < 1)
        {
            music.fadeSourceOut(0.0001f);
            inputs += 1;
            sound.playSound("start");
            PlayerPrefs.SetInt("score", 0);
            PlayerPrefs.SetInt("hp", 8);
            StartCoroutine(fadeOut());
        }
    }
Exemplo n.º 3
0
 public IEnumerator fadeOutScreen()
 {
     music.fadeSourceOut(0.0001f);
     blackScreen.CrossFadeAlpha(1, 1, false);
     yield return(new WaitForSeconds(1.0f));
 }