You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
564 B
26 lines
564 B
10 years ago
|
package mightypork.utils.eventbus.events;
|
||
|
|
||
|
|
||
|
import mightypork.utils.eventbus.BusEvent;
|
||
|
import mightypork.utils.eventbus.events.flags.DirectEvent;
|
||
|
import mightypork.utils.eventbus.events.flags.NonConsumableEvent;
|
||
|
import mightypork.utils.interfaces.Destroyable;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Invoke destroy() method of all subscribers. Used to deinit a system.
|
||
|
*
|
||
|
* @author Ondřej Hruška (MightyPork)
|
||
|
*/
|
||
|
@DirectEvent
|
||
|
@NonConsumableEvent
|
||
|
public class DestroyEvent extends BusEvent<Destroyable> {
|
||
|
|
||
|
@Override
|
||
|
public void handleBy(Destroyable handler)
|
||
|
{
|
||
|
handler.destroy();
|
||
|
}
|
||
|
|
||
|
}
|