26 lines
768 B
C#
Raw Normal View History

2021-11-14 03:29:58 -08:00
using System.Linq;
using QSB.MeteorSync.WorldObjects;
2021-11-10 18:40:02 -08:00
using QSB.WorldSync;
namespace QSB.MeteorSync
{
public class MeteorManager : WorldObjectManager
{
public static bool Ready;
2021-11-14 03:29:58 -08:00
public static WhiteHoleVolume WhiteHoleVolume;
2021-11-10 18:40:02 -08:00
protected override void RebuildWorldObjects(OWScene scene)
{
2021-11-17 02:36:28 -08:00
// wait for all late initializers (which includes meteor launchers) to finish
QSBCore.UnityEvents.RunWhen(() => LateInitializerManager.s_lateInitializers.Count == 0, () =>
2021-11-10 18:40:02 -08:00
{
2021-11-15 02:39:06 -08:00
WhiteHoleVolume = QSBWorldSync.GetUnityObjects<WhiteHoleVolume>().First();
QSBWorldSync.Init<QSBMeteorLauncher, MeteorLauncher>();
2021-11-10 18:40:02 -08:00
QSBWorldSync.Init<QSBMeteor, MeteorController>();
QSBWorldSync.Init<QSBFragment, FragmentIntegrity>();
Ready = true;
2021-11-17 02:36:28 -08:00
});
2021-11-10 18:40:02 -08:00
}
}
}