mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-29 03:28:26 +00:00
IAddComponentOnStart: some of these can be destroyed right after running
This commit is contained in:
parent
f301af02f3
commit
f8f37aa011
@ -16,7 +16,7 @@ namespace QSB.EyeOfTheUniverse.MaskSync
|
||||
|
||||
public static List<PlayerInfo> WentOnSolanumsWildRide = new();
|
||||
|
||||
public void Awake() => QSBSceneManager.OnSceneLoaded += OnSceneLoaded;
|
||||
private void Awake() => QSBSceneManager.OnSceneLoaded += OnSceneLoaded;
|
||||
|
||||
private static void OnSceneLoaded(OWScene oldScene, OWScene newScene, bool inUniverse)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ namespace QSB.RespawnSync
|
||||
private GameObject _owRecoveryPoint;
|
||||
private GameObject _qsbRecoveryPoint;
|
||||
|
||||
private void Start()
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
QSBSceneManager.OnSceneLoaded += (_, newScene, inUniverse)
|
||||
|
@ -30,7 +30,7 @@ namespace QSB.SatelliteSync
|
||||
|
||||
private static RenderTexture _satelliteCameraSnapshot;
|
||||
|
||||
public void Start()
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
QSBSceneManager.OnUniverseSceneLoaded += OnSceneLoaded;
|
||||
|
@ -9,7 +9,7 @@ namespace QSB.TimeSync
|
||||
{
|
||||
internal class TimeSyncUI : MonoBehaviour, IAddComponentOnStart
|
||||
{
|
||||
public static TimeSyncUI Instance;
|
||||
private static TimeSyncUI _instance;
|
||||
|
||||
public static float TargetTime;
|
||||
|
||||
@ -20,9 +20,9 @@ namespace QSB.TimeSync
|
||||
private TimeSyncType _currentType;
|
||||
private Enum _currentReason;
|
||||
|
||||
public void Awake()
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
_instance = this;
|
||||
enabled = false;
|
||||
|
||||
QSBSceneManager.OnUniverseSceneLoaded += OnUniverseSceneLoad;
|
||||
@ -47,10 +47,10 @@ namespace QSB.TimeSync
|
||||
}
|
||||
|
||||
public static void Start(TimeSyncType type, Enum reason) =>
|
||||
Delay.RunWhen(() => Instance._isSetUp, () => Instance.StartTimeSync(type, reason));
|
||||
Delay.RunWhen(() => _instance._isSetUp, () => _instance.StartTimeSync(type, reason));
|
||||
|
||||
public static void Stop() =>
|
||||
Delay.RunWhen(() => Instance._isSetUp, () => Instance.EndTimeSync());
|
||||
Delay.RunWhen(() => _instance._isSetUp, () => _instance.EndTimeSync());
|
||||
|
||||
private void StartTimeSync(TimeSyncType type, Enum reason)
|
||||
{
|
||||
|
@ -26,10 +26,11 @@ namespace QSB.Utility
|
||||
|
||||
private static Color _origColor;
|
||||
|
||||
private void Start()
|
||||
private void Awake()
|
||||
{
|
||||
_origColor = Camera.main.backgroundColor;
|
||||
UpdateFromDebugSetting();
|
||||
Destroy(this);
|
||||
}
|
||||
|
||||
private static void OnSceneLoaded(OWScene arg1, OWScene arg2, bool arg3)
|
||||
|
Loading…
Reference in New Issue
Block a user