falldown/falldmg end scene trigger

This commit is contained in:
orsolya-st
2026-06-07 03:31:15 +02:00
parent 9d019e7ff2
commit 3cd0dc032d
2 changed files with 5 additions and 21 deletions
+5 -7
View File
@@ -127,16 +127,14 @@ public class DamageHandler : MonoBehaviour
{
if(reason == "hole")
{
SceneManager.LoadScene(3, LoadSceneMode.Single);
SceneManager.LoadScene(2, LoadSceneMode.Single);
Debug.Log("Died from hole");
} else if (reason == "fallDamage")
{
Debug.Log("Died from fall damage");
} else if (reason == "fallOut")
} else if (reason == "fallDamage" || reason == "fallOut")
{
Debug.Log("Fell too much");
SceneManager.LoadScene(3, LoadSceneMode.Single);
Destroy(gameObject);
}
Destroy(gameObject);
}
}