Commit aeacf84c authored by Sebastian Woelfel's avatar Sebastian Woelfel

hole

parent 182d141f
......@@ -5,15 +5,22 @@ using UnityEngine;
public class Hole : MonoBehaviour
{
public GameObject deathCanvas;
private GameObject pauseMenu;
private void Start()
{
if (pauseMenu == null)
{
pauseMenu = GameObject.FindWithTag("PauseMenu");
}
}
public void OnTriggerEnter2D(Collider2D other)
{
Debug.Log("bla");
if (other.CompareTag("Player"))
{
other.gameObject.SetActive(false);
deathCanvas.SetActive(true);
pauseMenu.GetComponent<PauseMenu>().DeathScreen();
}
if (other.CompareTag("Box"))
{
......
......@@ -92,7 +92,6 @@ public class PauseMenu : MonoBehaviour
public void DeathScreen()
{
print("ja");
deathCanvas.SetActive(true);
playerIsDead = true;
eventSystem.firstSelectedGameObject = respawnButton;
......
fileFormatVersion: 2
guid: 3729dbd5d694ba447b2a39be3bb3397a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment