This commit is contained in:
go38coz
2026-06-07 04:02:49 +02:00
18 changed files with 1301 additions and 300 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);
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ public class StartScene : MonoBehaviour
// Update is called once per frame
void Update()
{
if (Input.anyKey)
if (Input.anyKeyDown)
{
// Start the "coroutine" instead of switching scenes immediately
StartCoroutine(PlaySoundAndLoad());