quantum-space-buddies/QSB/TimeSync/WakeUpPatches.cs

22 lines
666 B
C#
Raw Normal View History

using OWML.ModHelper.Events;
2020-08-13 21:06:34 +00:00
namespace QSB.TimeSync
{
public static class WakeUpPatches
{
public static void AddPatches()
{
QSB.Helper.HarmonyHelper.AddPrefix<PlayerCameraEffectController>("OnStartOfTimeLoop", typeof(WakeUpPatches), nameof(OnStartOfTimeLoopPrefix));
2020-08-13 21:06:34 +00:00
}
public static bool OnStartOfTimeLoopPrefix(ref PlayerCameraEffectController __instance)
{
if (__instance.gameObject.CompareTag("MainCamera") && LoadManager.GetCurrentScene() != OWScene.EyeOfTheUniverse)
{
__instance.Invoke("WakeUp");
2020-08-13 21:06:34 +00:00
}
return false;
}
}
}