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
|
|
|
|
|
{
|
2021-11-13 21:15:01 -08:00
|
|
|
|
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();
|
2021-11-13 21:15:01 -08:00
|
|
|
|
QSBWorldSync.Init<QSBMeteorLauncher, MeteorLauncher>();
|
2021-11-10 18:40:02 -08:00
|
|
|
|
QSBWorldSync.Init<QSBMeteor, MeteorController>();
|
2021-11-13 21:15:01 -08:00
|
|
|
|
QSBWorldSync.Init<QSBFragment, FragmentIntegrity>();
|
|
|
|
|
Ready = true;
|
2021-11-17 02:36:28 -08:00
|
|
|
|
});
|
2021-11-10 18:40:02 -08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|