quantum-space-buddies/QSB/WorldSync/WorldObjectManager.cs
2022-01-25 19:43:59 -08:00

32 lines
780 B
C#

using UnityEngine;
namespace QSB.WorldSync
{
public enum WorldObjectType
{
Both,
SolarSystem,
Eye
}
public abstract class WorldObjectManager : MonoBehaviour
{
/// <summary>
/// when the scene does not match the type, this manager will not build its world objects
/// </summary>
public abstract WorldObjectType WorldObjectType { get; }
public abstract void BuildWorldObjects(OWScene scene);
public virtual void UnbuildWorldObjects() { }
/// indicates that this won't become ready immediately
protected void StartDelayedReady() => QSBWorldSync._numManagersReadying++;
/// indicates that this is now ready
protected void FinishDelayedReady() => QSBWorldSync._numManagersReadying--;
public override string ToString() => GetType().Name;
}
}