Edit: fixed now. you have to delete SceneManger.LoadScene(1) and SceneManger.LoadScene(0).
void OnCollisionEnter(Collision collision)
{
switch (collision.gameObject.tag)
{
case "Friendly":
break;
case "Finish":
state = State.Transcending;
Invoke("LoadNextLevel", 1f); // paramertize time
SceneManager.LoadScene(1); <----- delete this
break;
default:
state = State.Dying;
Invoke("LoadFirstLevel", 1f);
SceneManager.LoadScene(0); <------- delete this
break;
}
}