46 lines
1.1 KiB
C#
Raw Normal View History

using QSB.WorldSync;
namespace QSB.PoolSync
{
2021-03-29 23:37:36 +01:00
internal class PoolManager : WorldObjectManager
{
public override WorldObjectType WorldObjectType => WorldObjectType.SolarSystem;
public override void BuildWorldObjects(OWScene scene)
{
foreach (var streaming in QSBWorldSync.GetUnityObjects<NomaiRemoteCameraStreaming>())
{
streaming.gameObject.AddComponent<CustomNomaiRemoteCameraStreaming>();
}
2021-06-18 22:38:32 +01:00
foreach (var camera in QSBWorldSync.GetUnityObjects<NomaiRemoteCamera>())
{
camera.gameObject.AddComponent<CustomNomaiRemoteCamera>();
}
2021-06-18 22:38:32 +01:00
foreach (var platform in QSBWorldSync.GetUnityObjects<NomaiRemoteCameraPlatform>())
{
platform.gameObject.AddComponent<CustomNomaiRemoteCameraPlatform>();
}
}
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);
}
}
}
}