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

26 lines
550 B
C#
Raw Normal View History

2022-01-29 04:49:07 +00:00
using Cysharp.Threading.Tasks;
2022-02-01 08:58:52 +00:00
using QSB.Utility;
2022-01-29 04:49:07 +00:00
using System.Threading;
2022-02-01 22:24:21 +00:00
using UnityEngine;
2021-03-23 13:18:29 +00:00
2022-03-03 03:46:33 +00:00
namespace QSB.WorldSync;
public enum WorldObjectScene
2021-03-23 13:18:29 +00:00
{
2022-03-03 03:46:33 +00:00
Both,
SolarSystem,
Eye
}
2021-12-21 02:35:38 +00:00
2022-03-03 03:46:33 +00:00
public abstract class WorldObjectManager : MonoBehaviour, IAddComponentOnStart
{
public abstract WorldObjectScene WorldObjectScene { get; }
2022-03-11 18:04:11 +00:00
public virtual bool DlcOnly => false;
2021-12-21 02:35:38 +00:00
2022-03-03 03:46:33 +00:00
public abstract UniTask BuildWorldObjects(OWScene scene, CancellationToken ct);
2022-03-03 03:46:33 +00:00
public virtual void UnbuildWorldObjects() { }
2022-03-08 01:38:22 +00:00
public override string ToString() => GetType().Name;
2022-03-11 18:04:11 +00:00
}