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

30 lines
724 B
C#
Raw Normal View History

using UnityEngine;
2021-03-23 13:18:29 +00:00
namespace QSB.WorldSync
{
2021-12-20 18:35:38 -08:00
public enum WorldObjectType
{
Both,
SolarSystem,
Eye
}
2021-03-23 13:18:29 +00:00
public abstract class WorldObjectManager : MonoBehaviour
{
2021-12-20 18:35:38 -08:00
/// <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--;
2021-03-23 13:18:29 +00:00
}
}