2020-08-18 20:47:17 +02:00
|
|
|
|
using QSB.Animation;
|
2020-08-13 21:46:16 +02:00
|
|
|
|
using QSB.DeathSync;
|
|
|
|
|
using QSB.ElevatorSync;
|
2020-08-13 14:32:58 +01:00
|
|
|
|
using QSB.GeyserSync;
|
2020-08-26 20:50:30 +01:00
|
|
|
|
using QSB.OrbSync;
|
2020-08-13 21:46:16 +02:00
|
|
|
|
using QSB.TimeSync;
|
|
|
|
|
using QSB.Tools;
|
|
|
|
|
using QSB.TransformSync;
|
2020-08-15 20:32:58 +01:00
|
|
|
|
using System.Collections.Generic;
|
2020-08-12 21:58:29 +02:00
|
|
|
|
|
|
|
|
|
namespace QSB.Events
|
2020-08-08 00:08:44 +01:00
|
|
|
|
{
|
2020-08-10 14:48:40 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates instances of all of the events QSB uses.
|
|
|
|
|
/// </summary>
|
2020-08-09 12:19:51 +01:00
|
|
|
|
public static class EventList
|
2020-08-08 00:08:44 +01:00
|
|
|
|
{
|
2020-08-09 14:26:33 +01:00
|
|
|
|
public static bool Ready { get; private set; }
|
|
|
|
|
|
2020-08-18 20:47:17 +02:00
|
|
|
|
private static List<IQSBEvent> _eventList = new List<IQSBEvent>();
|
2020-08-15 20:32:58 +01:00
|
|
|
|
|
2020-08-08 00:08:44 +01:00
|
|
|
|
public static void Init()
|
|
|
|
|
{
|
2020-08-18 20:47:17 +02:00
|
|
|
|
_eventList = new List<IQSBEvent>
|
2020-08-15 20:32:58 +01:00
|
|
|
|
{
|
|
|
|
|
new PlayerReadyEvent(),
|
2020-08-15 21:33:39 +01:00
|
|
|
|
new PlayerJoinEvent(),
|
2020-08-15 20:32:58 +01:00
|
|
|
|
new PlayerSuitEvent(),
|
|
|
|
|
new PlayerFlashlightEvent(),
|
|
|
|
|
new PlayerSignalscopeEvent(),
|
|
|
|
|
new PlayerTranslatorEvent(),
|
|
|
|
|
new PlayerProbeLauncherEvent(),
|
|
|
|
|
new PlayerProbeEvent(),
|
|
|
|
|
new PlayerSectorEvent(),
|
|
|
|
|
new PlayerLeaveEvent(),
|
|
|
|
|
new PlayerDeathEvent(),
|
|
|
|
|
new PlayerStatesRequestEvent(),
|
|
|
|
|
new ElevatorEvent(),
|
|
|
|
|
new GeyserEvent(),
|
2020-08-22 17:26:48 +01:00
|
|
|
|
new ServerTimeEvent(),
|
2020-08-26 20:50:30 +01:00
|
|
|
|
new AnimTriggerEvent(),
|
2020-08-29 22:49:29 +01:00
|
|
|
|
new OrbSlotEvent()
|
|
|
|
|
//new OrbUserEvent()
|
|
|
|
|
//new OrbStatusEvent()
|
2020-08-15 20:32:58 +01:00
|
|
|
|
};
|
|
|
|
|
|
2020-08-18 20:47:17 +02:00
|
|
|
|
_eventList.ForEach(ev => ev.SetupListener());
|
|
|
|
|
|
2020-08-09 14:26:33 +01:00
|
|
|
|
Ready = true;
|
2020-08-08 00:08:44 +01:00
|
|
|
|
}
|
2020-08-15 20:32:58 +01:00
|
|
|
|
|
|
|
|
|
public static void Reset()
|
|
|
|
|
{
|
|
|
|
|
Ready = false;
|
2020-08-18 20:47:17 +02:00
|
|
|
|
|
|
|
|
|
_eventList.ForEach(ev => ev.CloseListener());
|
|
|
|
|
|
|
|
|
|
_eventList = new List<IQSBEvent>();
|
2020-08-15 20:32:58 +01:00
|
|
|
|
}
|
2020-08-08 00:08:44 +01:00
|
|
|
|
}
|
|
|
|
|
}
|