29 lines
930 B
C#
Raw Normal View History

2022-04-01 02:23:59 -07:00
using Cysharp.Threading.Tasks;
using QSB.EchoesOfTheEye.AlarmTotemSync.WorldObjects;
using QSB.WorldSync;
using System.Threading;
2022-04-02 14:15:57 -07:00
using UnityEngine;
2022-04-01 02:23:59 -07:00
namespace QSB.EchoesOfTheEye.AlarmTotemSync;
2022-04-01 17:26:58 -07:00
public class AlarmTotemManager : WorldObjectManager
2022-04-01 02:23:59 -07:00
{
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
public override bool DlcOnly => true;
2022-04-02 14:15:57 -07:00
private QSBAlarmSequenceController _qsbAlarmSequenceController;
2022-04-02 14:09:04 -07:00
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
{
// QSBWorldSync.Init<QSBAlarmTotem, AlarmTotem>();
2022-04-02 14:09:04 -07:00
QSBWorldSync.Init<QSBAlarmBell, AlarmBell>();
2022-04-02 14:15:57 -07:00
_qsbAlarmSequenceController = new GameObject(nameof(QSBAlarmSequenceController))
.AddComponent<QSBAlarmSequenceController>();
DontDestroyOnLoad(_qsbAlarmSequenceController.gameObject);
2022-04-02 14:09:04 -07:00
}
2022-04-02 14:15:57 -07:00
public override void UnbuildWorldObjects() =>
Destroy(_qsbAlarmSequenceController.gameObject);
2022-04-01 02:23:59 -07:00
}