T
- The type of CellGame that uses the SpaceStates that this
SpaceLayer can be assigned topublic abstract class SpaceLayer<T extends CellGame> extends SpaceThinker<T>
A SpaceLayer is a SpaceThinker that renders visuals either in front of or behind those of the SpaceObjects in the SpaceState to which it is assigned. To render visuals, a SpaceLayer must be assigned to a SpaceState through its setLayer() method. SpaceLayers are intended to be used to display objects in the foreground or background of a SpaceState's space.
Constructor and Description |
---|
SpaceLayer() |
Modifier and Type | Method and Description |
---|---|
abstract void |
renderActions(T game,
SpaceState<T> state,
org.newdawn.slick.Graphics g,
long x,
long y,
int x1,
int y1,
int x2,
int y2)
Actions for this SpaceLayer to take to render its visuals through a
Viewport's camera.
|
afterMovementActions, getThis
addedActions, frameActions, getActionPriority, getEffectiveTimeFactor, getGameState, getNewActionPriority, getNewGameState, getThinkerState, getThinkerStateDuration, getTimeFactor, getTimerValue, removedActions, setActionPriority, setGameState, setThinkerState, setThinkerStateDuration, setTimeFactor, setTimerValue, timeUnitActions
public abstract void renderActions(T game, SpaceState<T> state, org.newdawn.slick.Graphics g, long x, long y, int x1, int y1, int x2, int y2)
game
- This SpaceLayer's SpaceState's CellGamestate
- This SpaceLayer's SpaceStateg
- The Graphics context to which this SpaceLayer is rendering its
visuals this framex
- The camera's center x-coordinatey
- The camera's center y-coordinatex1
- The x-coordinate in pixels of the Viewport's left edge on the
Graphics contexty1
- The y-coordinate in pixels of the Viewport's top edge on the
Graphics contextx2
- The x-coordinate in pixels of the Viewport's right edge on the
Graphics contexty2
- The y-coordinate in pixels of the Viewport's bottom edge on the
Graphics context