Rogue: Savage Rats, a retro-themed dungeon crawler
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.
 
 
rogue-savage-rats/src/mightypork/rogue/bus/Subsystem.java

38 lines
636 B

package mightypork.rogue.bus;
import mightypork.rogue.AppAccess;
import mightypork.utils.control.interf.Destroyable;
/**
* App event bus client, to be used for subsystems, screens and anything that
* needs access to the eventbus
*
* @author MightyPork
*/
public abstract class Subsystem extends ChildClient implements Destroyable {
public Subsystem(AppAccess app) {
super(app);
bus().subscribe(this);
}
@Override
public final void destroy()
{
deinit();
bus().unsubscribe(this);
}
/**
* Deinitialize the subsystem<br>
* (called during destruction)
*/
protected abstract void deinit();
}