31 lines
850 B
C#
Raw Normal View History

2020-08-13 19:25:12 +02:00
using UnityEngine;
namespace QSB.GeyserSync
{
public class GeyserManager : MonoBehaviour
{
public static GeyserManager Instance { get; private set; }
private void Awake()
{
Instance = this;
QSB.Helper.Events.Subscribe<GeyserController>(OWML.Common.Events.AfterAwake);
QSB.Helper.Events.Event += OnEvent;
}
public void EmptyUpdate()
{
QSB.Helper.HarmonyHelper.EmptyMethod<GeyserController>("Update");
}
private void OnEvent(MonoBehaviour behaviour, OWML.Common.Events ev)
{
2020-08-13 19:35:42 +02:00
if (behaviour is GeyserController geyserController && ev == OWML.Common.Events.AfterAwake)
2020-08-13 19:25:12 +02:00
{
var geyser = new QSBGeyser();
geyser.Init(geyserController);
}
}
}
}