Versatile Java game engine with pluggable backends (this was used in Rogue, I think)
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.
gamecore/src/mightypork/gamecore/gui/screens/ScreenLayer.java

51 lines
665 B

package mightypork.gamecore.gui.screens;
import mightypork.utils.annotations.Stub;
/**
* Screen display layer
*
* @author Ondřej Hruška (MightyPork)
*/
public abstract class ScreenLayer extends Overlay {
private final Screen screen;
/**
* @param screen parent screen
*/
public ScreenLayer(Screen screen)
{
this.screen = screen;
}
/**
* @return parent screen instance
*/
protected final Screen getScreen()
{
return screen;
}
/**
* Called when the screen becomes active
*/
@Stub
protected void onScreenEnter()
{
}
/**
* Called when the screen is no longer active
*/
@Stub
protected void onScreenLeave()
{
}
}