public static void StopSuperscanner() { TowerActivationEvent.Unsubscribe(OnTowerActive); TowerDeactivationEvent.Unsubscribe(OnTowerDeactive); TowerHijackEvent.Unsubscribe(OnTowerHijack); XanaAwakenEvent.Unsubscribe(OnXANAWake); XanaDefeatEvent.Unsubscribe(onXANASleep); }
public static void StopListening() { if (!_listening) { return; } //dont stop listening if we've already stopped (unregistering events that haven't been registered is harmless though) TowerActivationEvent.Unsubscribe(OnTowerActivation); XanaDefeatEvent.Unsubscribe(DoAThing); sendEvent("lyokodisconnect", "{\"user\":\"davcrox\"}"); /* * these unregister the listeners by using the delegate returned by Subscribe() */ TowerDeactivationEvent.Unsubscribe(onTowerdeactivation); XanaAwakenEvent.Unsubscribe(onXanaAwaken); TowerHijackEvent.Unsubscribe(onHijack); }