quantum-space-buddies/QSB/EchoesOfTheEye/RaftSync/RaftManager.cs

27 lines
779 B
C#
Raw Normal View History

2022-02-25 08:21:21 +00:00
using Cysharp.Threading.Tasks;
using QSB.EchoesOfTheEye.RaftSync.WorldObjects;
using QSB.Utility;
using QSB.WorldSync;
using System.Collections.Generic;
using System.Threading;
namespace QSB.EchoesOfTheEye.RaftSync
2022-02-25 08:21:21 +00:00
{
public class RaftManager : WorldObjectManager
{
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
2022-02-25 08:21:21 +00:00
public static readonly List<RaftController> Rafts = new();
2022-02-25 08:21:21 +00:00
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
{
Rafts.Clear();
Rafts.AddRange(QSBWorldSync.GetUnityObjects<RaftController>().SortDeterministic());
QSBWorldSync.Init<QSBRaft, RaftController>(Rafts);
2022-02-27 21:04:32 +00:00
QSBWorldSync.Init<QSBRaftDock, RaftDock>();
QSBWorldSync.Init<QSBDamRaftLift, DamRaftLift>();
}
2022-02-25 08:21:21 +00:00
}
}