mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
inline events
This commit is contained in:
parent
35af592a58
commit
f4483b27b3
@ -8,15 +8,11 @@ namespace QSB.ProbeSync.Events
|
|||||||
{
|
{
|
||||||
public override EventType Type => EventType.ProbeEvent;
|
public override EventType Type => EventType.ProbeEvent;
|
||||||
|
|
||||||
public override void SetupListener()
|
public override void SetupListener()
|
||||||
{
|
=> GlobalMessenger<ProbeEvent>.AddListener(EventNames.QSBProbeEvent, Handler);
|
||||||
GlobalMessenger<ProbeEvent>.AddListener(EventNames.QSBProbeEvent, Handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void CloseListener()
|
public override void CloseListener()
|
||||||
{
|
=> GlobalMessenger<ProbeEvent>.RemoveListener(EventNames.QSBProbeEvent, Handler);
|
||||||
GlobalMessenger<ProbeEvent>.RemoveListener(EventNames.QSBProbeEvent, Handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Handler(ProbeEvent probeEvent) => SendEvent(CreateMessage(probeEvent));
|
private void Handler(ProbeEvent probeEvent) => SendEvent(CreateMessage(probeEvent));
|
||||||
|
|
||||||
|
@ -8,15 +8,11 @@ namespace QSB.ProbeSync.Events
|
|||||||
{
|
{
|
||||||
public override EventType Type => EventType.ProbeStartRetrieve;
|
public override EventType Type => EventType.ProbeStartRetrieve;
|
||||||
|
|
||||||
public override void SetupListener()
|
public override void SetupListener()
|
||||||
{
|
=> GlobalMessenger<float>.AddListener(EventNames.QSBProbeStartRetrieve, Handler);
|
||||||
GlobalMessenger<float>.AddListener(EventNames.QSBProbeStartRetrieve, Handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void CloseListener()
|
public override void CloseListener()
|
||||||
{
|
=> GlobalMessenger<float>.RemoveListener(EventNames.QSBProbeStartRetrieve, Handler);
|
||||||
GlobalMessenger<float>.RemoveListener(EventNames.QSBProbeStartRetrieve, Handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Handler(float duration) => SendEvent(CreateMessage(duration));
|
private void Handler(float duration) => SendEvent(CreateMessage(duration));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user