29 lines
694 B
C#
29 lines
694 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class GameOverMainMenuReturnerButtonScriptForLoadingTheMainMenuSceneOnceAPlayerHasDiedAndHasThenPressedTheMainMenuButtonOnTheGameOverScreen : MonoBehaviour
|
|
{
|
|
public void r() {
|
|
AudioManager.Instance.StopAllAudio();
|
|
SceneManager.LoadScene(0);
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
foreach (var controller in Gamepad.all)
|
|
{
|
|
if (controller.crossButton.IsPressed())
|
|
{
|
|
r();
|
|
return;
|
|
}
|
|
}
|
|
|
|
if (Input.anyKeyDown)
|
|
r();
|
|
}
|
|
}
|