IEnumerator DeathAnimation() { animator.Play("Player_death"); yield return(new WaitForSeconds(1f)); gameOver.NavigationEnable(); }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.GetComponent <PlayerController>() != null) { Debug.Log(currentScene.name); LevelManager.Instance.MarkLevelComplete(currentScene); levelCompleteMenu.NavigationEnable(); //Debug.Log("Level Over!"); //SceneManager.LoadScene(sceneToLoad); //Sound SoundManager.Instance.Play(Sounds.LevelComplete); } }