2020-08-18 18:47:17 +00:00
|
|
|
|
using QSB.Animation;
|
2020-08-13 19:46:16 +00:00
|
|
|
|
using QSB.DeathSync;
|
|
|
|
|
using QSB.ElevatorSync;
|
2020-08-13 13:32:58 +00:00
|
|
|
|
using QSB.GeyserSync;
|
2020-08-13 19:46:16 +00:00
|
|
|
|
using QSB.TimeSync;
|
|
|
|
|
using QSB.Tools;
|
|
|
|
|
using QSB.TransformSync;
|
2020-08-15 19:32:58 +00:00
|
|
|
|
using System.Collections.Generic;
|
2020-08-12 19:58:29 +00:00
|
|
|
|
|
|
|
|
|
namespace QSB.Events
|
2020-08-07 23:08:44 +00:00
|
|
|
|
{
|
2020-08-10 13:48:40 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates instances of all of the events QSB uses.
|
|
|
|
|
/// </summary>
|
2020-08-09 11:19:51 +00:00
|
|
|
|
public static class EventList
|
2020-08-07 23:08:44 +00:00
|
|
|
|
{
|
2020-08-09 13:26:33 +00:00
|
|
|
|
public static bool Ready { get; private set; }
|
|
|
|
|
|
2020-08-18 18:47:17 +00:00
|
|
|
|
private static List<IQSBEvent> _eventList = new List<IQSBEvent>();
|
2020-08-15 19:32:58 +00:00
|
|
|
|
|
2020-08-07 23:08:44 +00:00
|
|
|
|
public static void Init()
|
|
|
|
|
{
|
2020-08-18 18:47:17 +00:00
|
|
|
|
_eventList = new List<IQSBEvent>
|
2020-08-15 19:32:58 +00:00
|
|
|
|
{
|
|
|
|
|
new PlayerReadyEvent(),
|
2020-08-15 20:33:39 +00:00
|
|
|
|
new PlayerJoinEvent(),
|
2020-08-15 19:32:58 +00: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 16:26:48 +00:00
|
|
|
|
new ServerTimeEvent(),
|
|
|
|
|
new AnimTriggerEvent()
|
2020-08-15 19:32:58 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-08-18 18:47:17 +00:00
|
|
|
|
_eventList.ForEach(ev => ev.SetupListener());
|
|
|
|
|
|
2020-08-09 13:26:33 +00:00
|
|
|
|
Ready = true;
|
2020-08-07 23:08:44 +00:00
|
|
|
|
}
|
2020-08-15 19:32:58 +00:00
|
|
|
|
|
|
|
|
|
public static void Reset()
|
|
|
|
|
{
|
|
|
|
|
Ready = false;
|
2020-08-18 18:47:17 +00:00
|
|
|
|
|
|
|
|
|
_eventList.ForEach(ev => ev.CloseListener());
|
|
|
|
|
|
|
|
|
|
_eventList = new List<IQSBEvent>();
|
2020-08-15 19:32:58 +00:00
|
|
|
|
}
|
2020-08-07 23:08:44 +00:00
|
|
|
|
}
|
|
|
|
|
}
|