End Screen & Fix layers collision bug

This commit is contained in:
2023-10-17 11:31:58 +02:00
parent ec1084bd10
commit e5c90cf3ec
13 changed files with 786 additions and 132 deletions
+5 -2
View File
@@ -1,5 +1,3 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerManager : MonoBehaviour
@@ -16,6 +14,9 @@ public class PlayerManager : MonoBehaviour
[SerializeField]
private GameObject pauseMenu;
[SerializeField]
private GameObject deathScreen;
private void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
@@ -44,6 +45,8 @@ public class PlayerManager : MonoBehaviour
Health = 0;
// Death animation + menu
Time.timeScale = 0f;
deathScreen.GetComponent<DeathScreen>().ShowScreen();
} else
{
// Damage animation