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

23 lines
665 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;
public class RaftManager : WorldObjectManager
{
2022-02-25 08:25:24 +00:00
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
2022-02-25 08:21:21 +00:00
public static readonly List<RaftController> Rafts = new();
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
{
Rafts.Clear();
Rafts.AddRange(QSBWorldSync.GetUnityObjects<RaftController>().SortDeterministic());
QSBWorldSync.Init<QSBRaft, RaftController>(Rafts);
}
}