2024-02-04 10:12:07 +01:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
2024-02-06 14:32:09 +01:00
|
|
|
using UnityEngine.InputSystem;
|
2024-02-04 10:12:07 +01:00
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
|
|
public class GameOverMainMenuReturnerButtonScriptForLoadingTheMainMenuSceneOnceAPlayerHasDiedAndHasThenPressedTheMainMenuButtonOnTheGameOverScreen : MonoBehaviour
|
|
|
|
{
|
2024-02-04 10:31:50 +01:00
|
|
|
public void r() {
|
2024-02-04 16:32:14 +01:00
|
|
|
AudioManager.Instance.StopAllAudio();
|
2024-02-04 10:31:50 +01:00
|
|
|
SceneManager.LoadScene(0);
|
2024-02-04 10:12:07 +01:00
|
|
|
}
|
2024-02-06 14:32:09 +01:00
|
|
|
|
|
|
|
void Update()
|
|
|
|
{
|
|
|
|
foreach (var controller in Gamepad.all)
|
|
|
|
{
|
|
|
|
if (controller.crossButton.IsPressed())
|
|
|
|
{
|
|
|
|
r();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Input.anyKeyDown)
|
|
|
|
r();
|
|
|
|
}
|
2024-02-04 10:12:07 +01:00
|
|
|
}
|