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.
62 lines
1.0 KiB
62 lines
1.0 KiB
10 years ago
|
package mightypork.gamecore.core;
|
||
10 years ago
|
|
||
|
|
||
10 years ago
|
import mightypork.gamecore.eventbus.clients.RootBusNode;
|
||
10 years ago
|
import mightypork.gamecore.input.InputSystem;
|
||
|
import mightypork.gamecore.render.DisplaySystem;
|
||
10 years ago
|
import mightypork.gamecore.resources.audio.SoundSystem;
|
||
10 years ago
|
|
||
|
|
||
|
/**
|
||
|
* App event bus client, to be used for subsystems, screens and anything that
|
||
10 years ago
|
* needs access to the eventbus and other systems; Attached directly to bus.
|
||
10 years ago
|
*
|
||
|
* @author MightyPork
|
||
|
*/
|
||
10 years ago
|
public abstract class AppModule extends RootBusNode implements AppAccess {
|
||
10 years ago
|
|
||
|
private final AppAccess app;
|
||
|
|
||
|
|
||
10 years ago
|
/**
|
||
|
* Create a module
|
||
|
*
|
||
|
* @param app access to app systems
|
||
|
*/
|
||
10 years ago
|
public AppModule(AppAccess app)
|
||
|
{
|
||
10 years ago
|
super(app);
|
||
|
|
||
|
this.app = app;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
10 years ago
|
public final SoundSystem getSoundSystem()
|
||
10 years ago
|
{
|
||
10 years ago
|
return app.getSoundSystem();
|
||
10 years ago
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
10 years ago
|
public final InputSystem getInput()
|
||
10 years ago
|
{
|
||
10 years ago
|
return app.getInput();
|
||
10 years ago
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
10 years ago
|
public final DisplaySystem getDisplay()
|
||
10 years ago
|
{
|
||
10 years ago
|
return app.getDisplay();
|
||
10 years ago
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
10 years ago
|
public final void shutdown()
|
||
10 years ago
|
{
|
||
|
app.shutdown();
|
||
|
}
|
||
|
|
||
|
}
|