Merge branch 'main' of https://github.com/orsolya-st/gamejam_050626
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user