public abstract class StateActionRenderLayer extends java.lang.Object implements RenderLayer
State
and Action to render. Subclasses need to implement the
renderStateAction(java.awt.Graphics2D, State, Action, float, float)
method.| Modifier and Type | Field and Description |
|---|---|
protected Action |
renderAction
The current
Action to render |
protected State |
renderState
The current
State to render |
| Constructor and Description |
|---|
StateActionRenderLayer() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearRenderedStateAction()
Sets the
State and Action to
render to null, which will prevent calls to the method renderStateAction(java.awt.Graphics2D, State, Action, float, float)
to be made. |
Action |
getRenderAction()
Returns the
Action that is/will be rendered |
State |
getRenderState()
Returns the
State that is/will be rendered |
void |
render(java.awt.Graphics2D g2,
float width,
float height) |
abstract void |
renderStateAction(java.awt.Graphics2D g2,
State s,
Action a,
float width,
float height)
Method to be implemented by subclasses that will render the input state-action to the given graphics context.
|
void |
updateRenderedStateAction(State s,
Action a)
|
public State getRenderState()
State that is/will be renderedStatepublic Action getRenderAction()
Action that is/will be renderedActionpublic void clearRenderedStateAction()
State and Action to
render to null, which will prevent calls to the method renderStateAction(java.awt.Graphics2D, State, Action, float, float)
to be made.public void render(java.awt.Graphics2D g2,
float width,
float height)
render in interface RenderLayer