quantum-space-buddies/QSB/WorldSync/WorldObjectManager.cs

27 lines
629 B
C#
Raw Normal View History

2022-01-28 20:49:07 -08:00
using Cysharp.Threading.Tasks;
2022-02-01 08:58:52 +00:00
using QSB.Utility;
2022-01-28 20:49:07 -08:00
using System.Threading;
2022-02-01 14:24:21 -08:00
using UnityEngine;
2021-03-23 13:18:29 +00:00
namespace QSB.WorldSync;
public enum WorldObjectType
2021-03-23 13:18:29 +00:00
{
Both,
SolarSystem,
Eye
}
2021-12-20 18:35:38 -08:00
public abstract class WorldObjectManager : MonoBehaviour, IAddComponentOnStart
{
/// <summary>
/// when the scene does not match the type, this manager will not build its world objects
/// </summary>
public abstract WorldObjectType WorldObjectType { get; }
2021-12-20 18:35:38 -08:00
public abstract UniTask BuildWorldObjects(OWScene scene, CancellationToken ct);
public virtual void UnbuildWorldObjects() { }
public override string ToString() => GetType().Name;
}