mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 13:23:05 +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 void SetupListener()
|
||||
{
|
||||
GlobalMessenger<ProbeEvent>.AddListener(EventNames.QSBProbeEvent, Handler);
|
||||
}
|
||||
public override void SetupListener()
|
||||
=> GlobalMessenger<ProbeEvent>.AddListener(EventNames.QSBProbeEvent, Handler);
|
||||
|
||||
public override void CloseListener()
|
||||
{
|
||||
GlobalMessenger<ProbeEvent>.RemoveListener(EventNames.QSBProbeEvent, Handler);
|
||||
}
|
||||
public override void CloseListener()
|
||||
=> GlobalMessenger<ProbeEvent>.RemoveListener(EventNames.QSBProbeEvent, Handler);
|
||||
|
||||
private void Handler(ProbeEvent probeEvent) => SendEvent(CreateMessage(probeEvent));
|
||||
|
||||
|
@ -8,15 +8,11 @@ namespace QSB.ProbeSync.Events
|
||||
{
|
||||
public override EventType Type => EventType.ProbeStartRetrieve;
|
||||
|
||||
public override void SetupListener()
|
||||
{
|
||||
GlobalMessenger<float>.AddListener(EventNames.QSBProbeStartRetrieve, Handler);
|
||||
}
|
||||
public override void SetupListener()
|
||||
=> GlobalMessenger<float>.AddListener(EventNames.QSBProbeStartRetrieve, Handler);
|
||||
|
||||
public override void CloseListener()
|
||||
{
|
||||
GlobalMessenger<float>.RemoveListener(EventNames.QSBProbeStartRetrieve, Handler);
|
||||
}
|
||||
public override void CloseListener()
|
||||
=> GlobalMessenger<float>.RemoveListener(EventNames.QSBProbeStartRetrieve, Handler);
|
||||
|
||||
private void Handler(float duration) => SendEvent(CreateMessage(duration));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user