public abstract class GameScreenEntity extends Entity implements GameScreen
Entity
that also implements GameScreen
This Entity
will update/interpolate/render in a depth-first order,
i.e. it will find the deepest descendant in the tree and execute
update/interpolate/render on the UpdatableComponent
s/
RenderableComponent
s of that first before traversing up the tree
until it reaches this entityConstructor and Description |
---|
GameScreenEntity(int id) |
Modifier and Type | Method and Description |
---|---|
void |
interpolate(GameContainer gc,
float alpha)
Interpolate between the previous and current state
|
void |
render(GameContainer gc,
Graphics g)
Renders the game screen
|
void |
update(GameContainer gc,
ScreenManager<? extends GameScreen> screenManager,
float delta)
Updates the game screen
|
addChild, addComponent, addEntityListener, destroy, getChildren, getComponent, getComponent, getComponent, getComponent, getComponentInDescendants, getComponentInDescendants, getComponentInDescendants, getComponentInDescendants, getComponents, getComponents, getComponentsInDescendants, getComponentsInDescendants, getId, getUUID, removeAllComponentsOfType, removeAllComponentsOfType, removeChild, removeComponent, removeEntityListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, initialise, postTransitionIn, postTransitionOut, preTransitionIn, preTransitionOut
public void update(GameContainer gc, ScreenManager<? extends GameScreen> screenManager, float delta)
GameScreen
update
in interface GameScreen
gc
- The GameContainer
of the gamescreenManager
- The ScreenManager
of the gamedelta
- The time in seconds since the last updatepublic void interpolate(GameContainer gc, float alpha)
GameScreen
interpolate
in interface GameScreen
alpha
- The interpolation alpha valuepublic void render(GameContainer gc, Graphics g)
GameScreen
render
in interface GameScreen
gc
- The GameContainer
of the gameg
- The Graphics
context available for rendering