mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
32 lines
780 B
C#
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;
|
|
}
|
|
}
|