quantum-space-buddies/QSB/GeyserSync/GeyserManager.cs
2020-08-13 20:43:47 +02:00

32 lines
849 B
C#

using UnityEngine;
namespace QSB.GeyserSync
{
public class GeyserManager : MonoBehaviour
{
public static GeyserManager Instance { get; private set; }
private void Awake()
{
Instance = this;
LoadManager.OnCompleteSceneLoad += OnCompleteSceneLoad;
}
private void OnCompleteSceneLoad(OWScene oldScene, OWScene newScene)
{
var geyserControllers = Resources.FindObjectsOfTypeAll<GeyserController>();
for (var id = 0; id < geyserControllers.Length; id++)
{
var geyser = new QSBGeyser();
geyser.Init(geyserControllers[id], id);
}
}
public void EmptyUpdate()
{
QSB.Helper.HarmonyHelper.EmptyMethod<GeyserController>("Update");
}
}
}