1
0
mirror of synced 2024-09-24 02:58:23 +02:00
TaikoModStuff/QuickQuitSong.cs
Cainan 33306c9f5e
Added new patches
Adds a Quick Restart and Quick exit to Select Song patch
as well as a patch to load saves offline.

and of course, credit to Lukino for that offline saving patch.
2022-04-14 02:00:58 +01:00

22 lines
584 B
C#

using UnityEngine;
using UnityEngine.SceneManagement;
using BepInEx;
using HarmonyLib;
namespace TaikoModStuff
{
[HarmonyPatch]
public class QuickQuitSong
{
[HarmonyPatch(typeof(EnsoGameManager), "ProcExecPause")]
[HarmonyPrefix]
static void customProcExecPause()
{
bool keyDown = Input.GetKeyDown(KeyCode.Escape);
if (keyDown)
{
TaikoSingletonMonoBehaviour<CommonObjects>.Instance.MySceneManager.ChangeRelayScene("SongSelect", true);
}
}
}
}