// Update is called once per frame
 void Update()
 {
     if (playerCollider.IsTouching(transitionerCollider))
     {
         changer.FadeToNextLevel();
     }
 }
Esempio n. 2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "death")
     {
         Debug.Log("death");
         dead = true;
         versions++;
         //v_text.text = "Version: " + versions;
     }
     else if (other.tag == "Light")
     {
         playFx = true;
         animator.SetBool("isDying", true);
         Level_script.FadeToNextLevel();
     }
     else if (other.tag == "Autodestroy")
     {
         startTimer = true;
     }
 }