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.
56 lines
853 B
56 lines
853 B
10 years ago
|
package mightypork.gamecore.control;
|
||
|
|
||
|
|
||
|
import mightypork.gamecore.AppAccess;
|
||
|
import mightypork.gamecore.input.InputSystem;
|
||
|
import mightypork.gamecore.render.DisplaySystem;
|
||
|
import mightypork.gamecore.resources.sounds.SoundSystem;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 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 AppAccess {
|
||
|
|
||
|
private final AppAccess app;
|
||
|
|
||
|
|
||
|
public Subsystem(AppAccess app) {
|
||
|
super(app);
|
||
|
|
||
|
this.app = app;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public final SoundSystem snd()
|
||
|
{
|
||
|
return app.snd();
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public final InputSystem input()
|
||
|
{
|
||
|
return app.input();
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public final DisplaySystem disp()
|
||
|
{
|
||
|
return app.disp();
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public void shutdown()
|
||
|
{
|
||
|
app.shutdown();
|
||
|
}
|
||
|
|
||
|
}
|