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.
42 lines
689 B
42 lines
689 B
10 years ago
|
package mightypork.gamecore.eventbus.clients;
|
||
10 years ago
|
|
||
10 years ago
|
|
||
10 years ago
|
import mightypork.gamecore.eventbus.BusAccess;
|
||
|
import mightypork.gamecore.eventbus.events.Destroyable;
|
||
10 years ago
|
|
||
|
|
||
|
/**
|
||
|
* Bus node that should be directly attached to the bus.
|
||
|
*
|
||
|
* @author MightyPork
|
||
|
*/
|
||
|
public abstract class RootBusNode extends BusNode implements Destroyable {
|
||
10 years ago
|
|
||
10 years ago
|
/**
|
||
|
* @param busAccess access to bus
|
||
|
*/
|
||
10 years ago
|
public RootBusNode(BusAccess busAccess)
|
||
|
{
|
||
10 years ago
|
super(busAccess);
|
||
10 years ago
|
|
||
10 years ago
|
getEventBus().subscribe(this);
|
||
10 years ago
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public final void destroy()
|
||
|
{
|
||
|
deinit();
|
||
|
|
||
10 years ago
|
getEventBus().unsubscribe(this);
|
||
10 years ago
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Deinitialize the subsystem<br>
|
||
|
* (called during destruction)
|
||
|
*/
|
||
|
protected abstract void deinit();
|
||
|
|
||
|
}
|