Beispiel #1
0
 public void OnTriggerEnter2D(Collider2D other)
 {
     if ((other.gameObject.tag == "Player" || other.gameObject.tag == "PlayerGround") && this.GetComponent <Collider2D>().isTrigger)
     {
         nextLevel = prevLevel + 1;
         gameOverScript.ChangeLevel(prevLevel, nextLevel);
         ingredientManager.ChangeLevel(prevLevel, nextLevel);
         prevLevel = nextLevel;
     }
 }