Example #1
0
    IEnumerator DeathAnimation()
    {
        animator.Play("Player_death");
        yield return(new WaitForSeconds(1f));

        gameOver.NavigationEnable();
    }
Example #2
0
 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);
     }
 }