quantum-space-buddies/QSB/ElevatorSync/ElevatorManager.cs

22 lines
520 B
C#
Raw Normal View History

using QSB.ElevatorSync.WorldObjects;
using QSB.WorldSync;
2020-08-13 18:43:47 +00:00
using UnityEngine;
namespace QSB.ElevatorSync
{
2020-12-02 21:23:01 +00:00
public class ElevatorManager : MonoBehaviour
{
public static ElevatorManager Instance { get; private set; }
2020-08-13 18:43:47 +00:00
2020-12-14 20:41:56 +00:00
public void Awake()
2020-12-02 21:23:01 +00:00
{
Instance = this;
QSBSceneManager.OnSceneLoaded += OnSceneLoaded;
}
2020-12-14 20:41:56 +00:00
public void OnDestroy() => QSBSceneManager.OnSceneLoaded -= OnSceneLoaded;
2020-11-25 09:54:52 +00:00
2021-02-24 10:45:25 +00:00
private void OnSceneLoaded(OWScene scene, bool isInUniverse)
=> QSBWorldSync.Init<QSBElevator, Elevator>();
2020-12-02 21:23:01 +00:00
}
2020-12-03 08:28:05 +00:00
}