24 lines
711 B
C#
Raw Normal View History

2022-02-25 00:21:21 -08:00
using Cysharp.Threading.Tasks;
using QSB.EchoesOfTheEye.RaftSync.WorldObjects;
using QSB.Utility;
using QSB.WorldSync;
using System.Collections.Generic;
using System.Threading;
2022-03-02 19:46:33 -08:00
namespace QSB.EchoesOfTheEye.RaftSync;
public class RaftManager : WorldObjectManager
2022-02-25 00:21:21 -08:00
{
2022-03-02 19:46:33 -08:00
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
2022-02-25 00:21:21 -08:00
2022-03-02 19:46:33 -08:00
public static readonly List<RaftController> Rafts = new();
2022-02-25 00:21:21 -08:00
2022-03-02 19:46:33 -08:00
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
{
Rafts.Clear();
Rafts.AddRange(QSBWorldSync.GetUnityObjects<RaftController>().SortDeterministic());
QSBWorldSync.Init<QSBRaft, RaftController>(Rafts);
QSBWorldSync.Init<QSBRaftDock, RaftDock>();
2022-03-11 09:39:47 -08:00
}
2022-03-11 06:40:00 -08:00
}