mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-28 22:13:23 +00:00
add manager stuff
This commit is contained in:
parent
01e798ff6a
commit
19d72dffee
@ -1,10 +1,11 @@
|
||||
using QSB.WorldSync;
|
||||
using QSB.Utility;
|
||||
using QSB.WorldSync;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.EyeOfTheUniverse.GalaxyMap
|
||||
{
|
||||
internal class GalaxyMapManager : MonoBehaviour
|
||||
internal class GalaxyMapManager : Manager
|
||||
{
|
||||
public static GalaxyMapManager Instance { get; private set; }
|
||||
|
||||
|
@ -9,7 +9,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EyeOfTheUniverse.MaskSync
|
||||
{
|
||||
internal class MaskManager : MonoBehaviour
|
||||
internal class MaskManager : Manager
|
||||
{
|
||||
private static bool _flickering;
|
||||
private static float _flickerOutTime;
|
||||
|
@ -1,8 +1,9 @@
|
||||
using UnityEngine;
|
||||
using QSB.Utility;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.Inputs
|
||||
{
|
||||
public class QSBInputManager : MonoBehaviour
|
||||
public class QSBInputManager : Manager
|
||||
{
|
||||
// TODO : finish instruments - disabled for 0.7.0 release
|
||||
/*
|
||||
|
@ -12,7 +12,7 @@ using UnityEngine.UI;
|
||||
|
||||
namespace QSB.Menus
|
||||
{
|
||||
internal class MenuManager : MonoBehaviour
|
||||
internal class MenuManager : Manager
|
||||
{
|
||||
public static MenuManager Instance;
|
||||
|
||||
|
@ -94,23 +94,16 @@ namespace QSB
|
||||
|
||||
gameObject.AddComponent<QSBNetworkManager>();
|
||||
gameObject.AddComponent<DebugActions>();
|
||||
gameObject.AddComponent<QSBInputManager>();
|
||||
gameObject.AddComponent<TimeSyncUI>();
|
||||
gameObject.AddComponent<PlayerEntanglementWatcher>();
|
||||
gameObject.AddComponent<DebugGUI>();
|
||||
gameObject.AddComponent<MenuManager>();
|
||||
gameObject.AddComponent<RespawnManager>();
|
||||
gameObject.AddComponent<SatelliteProjectorManager>();
|
||||
gameObject.AddComponent<StatueManager>();
|
||||
gameObject.AddComponent<GalaxyMapManager>();
|
||||
gameObject.AddComponent<DebugCameraSettings>();
|
||||
gameObject.AddComponent<MaskManager>();
|
||||
|
||||
// WorldObject managers
|
||||
QSBWorldSync.Managers = typeof(WorldObjectManager).GetDerivedTypes()
|
||||
.Select(x => (WorldObjectManager)gameObject.AddComponent(x))
|
||||
var managers = typeof(Manager).GetDerivedTypes()
|
||||
.Select(x => (Manager)gameObject.AddComponent(x))
|
||||
.ToArray();
|
||||
|
||||
QSBWorldSync.Managers = managers.OfType<WorldObjectManager>().ToArray();
|
||||
QSBPatchManager.OnPatchType += OnPatchType;
|
||||
QSBPatchManager.OnUnpatchType += OnUnpatchType;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.RespawnSync
|
||||
{
|
||||
internal class RespawnManager : MonoBehaviour
|
||||
internal class RespawnManager : Manager
|
||||
{
|
||||
public static RespawnManager Instance;
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
using QSB.WorldSync;
|
||||
using QSB.Utility;
|
||||
using QSB.WorldSync;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.SatelliteSync
|
||||
{
|
||||
internal class SatelliteProjectorManager : MonoBehaviour
|
||||
internal class SatelliteProjectorManager : Manager
|
||||
{
|
||||
public static SatelliteProjectorManager Instance { get; private set; }
|
||||
|
||||
|
@ -6,7 +6,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.StatueSync
|
||||
{
|
||||
internal class StatueManager : MonoBehaviour
|
||||
internal class StatueManager : Manager
|
||||
{
|
||||
public static StatueManager Instance { get; private set; }
|
||||
public bool HasStartedStatueLocally;
|
||||
|
6
QSB/Utility/Manager.cs
Normal file
6
QSB/Utility/Manager.cs
Normal file
@ -0,0 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.Utility
|
||||
{
|
||||
public abstract class Manager : MonoBehaviour { }
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using QSB.Utility;
|
||||
using System.Threading;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.WorldSync
|
||||
{
|
||||
@ -11,7 +11,7 @@ namespace QSB.WorldSync
|
||||
Eye
|
||||
}
|
||||
|
||||
public abstract class WorldObjectManager : MonoBehaviour
|
||||
public abstract class WorldObjectManager : Manager
|
||||
{
|
||||
/// <summary>
|
||||
/// when the scene does not match the type, this manager will not build its world objects
|
||||
|
Loading…
x
Reference in New Issue
Block a user