2022-01-29 04:49:07 +00:00
|
|
|
|
using Cysharp.Threading.Tasks;
|
|
|
|
|
using QSB.WorldSync;
|
|
|
|
|
using System.Threading;
|
2021-03-28 16:53:05 +00:00
|
|
|
|
|
|
|
|
|
namespace QSB.PoolSync
|
|
|
|
|
{
|
2021-03-29 22:37:36 +00:00
|
|
|
|
internal class PoolManager : WorldObjectManager
|
2021-03-28 16:53:05 +00:00
|
|
|
|
{
|
2021-12-21 02:41:12 +00:00
|
|
|
|
public override WorldObjectType WorldObjectType => WorldObjectType.SolarSystem;
|
|
|
|
|
|
2022-01-29 04:50:34 +00:00
|
|
|
|
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
|
2021-03-28 16:53:05 +00:00
|
|
|
|
{
|
2021-11-14 11:51:22 +00:00
|
|
|
|
foreach (var streaming in QSBWorldSync.GetUnityObjects<NomaiRemoteCameraStreaming>())
|
2021-03-28 16:53:05 +00:00
|
|
|
|
{
|
|
|
|
|
streaming.gameObject.AddComponent<CustomNomaiRemoteCameraStreaming>();
|
|
|
|
|
}
|
2021-06-18 21:38:32 +00:00
|
|
|
|
|
2021-11-14 11:51:22 +00:00
|
|
|
|
foreach (var camera in QSBWorldSync.GetUnityObjects<NomaiRemoteCamera>())
|
2021-03-28 16:53:05 +00:00
|
|
|
|
{
|
|
|
|
|
camera.gameObject.AddComponent<CustomNomaiRemoteCamera>();
|
|
|
|
|
}
|
2021-06-18 21:38:32 +00:00
|
|
|
|
|
2021-11-14 11:51:22 +00:00
|
|
|
|
foreach (var platform in QSBWorldSync.GetUnityObjects<NomaiRemoteCameraPlatform>())
|
2021-03-28 16:53:05 +00:00
|
|
|
|
{
|
|
|
|
|
platform.gameObject.AddComponent<CustomNomaiRemoteCameraPlatform>();
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-01-18 08:46:27 +00:00
|
|
|
|
|
|
|
|
|
public override void UnbuildWorldObjects()
|
|
|
|
|
{
|
|
|
|
|
foreach (var platform in QSBWorldSync.GetUnityObjects<CustomNomaiRemoteCameraPlatform>())
|
|
|
|
|
{
|
|
|
|
|
Destroy(platform);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach (var camera in QSBWorldSync.GetUnityObjects<CustomNomaiRemoteCamera>())
|
|
|
|
|
{
|
|
|
|
|
Destroy(camera);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach (var streaming in QSBWorldSync.GetUnityObjects<CustomNomaiRemoteCameraStreaming>())
|
|
|
|
|
{
|
|
|
|
|
Destroy(streaming);
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-03-28 16:53:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|