26 lines
852 B
C#
Raw Normal View History

2022-01-28 20:49:07 -08:00
using Cysharp.Threading.Tasks;
using QSB.MeteorSync.WorldObjects;
2021-11-10 18:40:02 -08:00
using QSB.WorldSync;
2021-11-25 15:32:34 +00:00
using System.Linq;
2022-01-28 20:49:07 -08:00
using System.Threading;
2021-11-10 18:40:02 -08:00
2022-03-02 19:46:33 -08:00
namespace QSB.MeteorSync;
public class MeteorManager : WorldObjectManager
2021-11-10 18:40:02 -08:00
{
2022-03-02 19:46:33 -08:00
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
2022-03-02 19:46:33 -08:00
public static WhiteHoleVolume WhiteHoleVolume;
2021-11-10 18:40:02 -08:00
2022-03-02 19:46:33 -08:00
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
{
// wait for all late initializers (which includes meteor launchers) to finish
await UniTask.WaitUntil(() => LateInitializerManager.isDoneInitializing, cancellationToken: ct);
2022-01-28 20:57:17 -08:00
2022-05-03 08:48:24 +01:00
WhiteHoleVolume = QSBWorldSync.GetUnityObject<WhiteHoleVolume>();
2022-03-02 19:46:33 -08:00
QSBWorldSync.Init<QSBFragment, FragmentIntegrity>();
2022-03-11 07:17:40 -08:00
QSBWorldSync.Init<QSBMeteorLauncher, MeteorLauncher>();
QSBWorldSync.Init<QSBMeteor, MeteorController>();
2021-11-10 18:40:02 -08:00
}
}