Represents the stage. This interface is one of the key components of this framework. The stage is
where everything actually happens. Each game has a stage on which different scenes appear. Its
instance is passed to the application through
init
. The
application needs to assign a StageManager
to the stage in
order to handle its important event.See Also:
public interface Stage
Method Summary
Modifier and Type | Method and Description |
---|---|
public void | addFilter(PostProcessingFilter filter) Adds a post-processing filter to the rendering pipeline. |
public float | getLogicalHeight() Gets the logical height of the stage. |
public float | getLogicalWidth() Gets the logical width of the stage. |
public StageManager | getManager() Gets the currently assigned stage manager. |
public Scene | getScene() Gets the current scene. |
public float | logicalToScreenX(float x) Converts stage x to screen x coordination using the scaling factor. |
public float | logicalToScreenY(float y) Converts stage y to screen y coordination using the scaling factor. |
public void | removeFilter(PostProcessingFilter filter) Removes a post-processing filter from the rendering pipeline. |
public float | screenToLogicalX(float x) Converts screen x to stage x coordination using the scaling factor. |
public float | screenToLogicalY(float y) Converts screen y to stage x coordination using the scaling factor. |
public void | setLoadingBackColor(RGB bgColor) Sets the background color of the loading screen. |
public void | setManager(StageManager stageManager) Sets the stage manager responsible for handling required functionality for this
Stage. |
public void | setScene(Scene scene) Sets the next scene that should be shown on this Stage. |
Method Detail
addFilter | ||
---|---|---|
public void addFilter( PostProcessingFilter filter ) Adds a post-processing filter to the rendering pipeline. Filters will be applied in the order
they are added to the stage. Parameters:
|
getLogicalHeight |
---|
public float getLogicalHeight() Gets the logical height of the stage. If the device is in landscape mode, this value is
always 600 and otherwise it is the scaled version of screen height to match the width of
600. Returns:
Logical height in texels |
getLogicalWidth |
---|
public float getLogicalWidth() Gets the logical width of the stage. If the device is in portrait mode, this value is always
600 and otherwise it is the scaled version of screen width to match the height of 600. Returns:
Logical width in texels |
getManager |
---|
public StageManager getManager() Gets the currently assigned stage manager. A stage manager handles basic events and
functionality for this Stage. Returns:
The stage manager for this stage |
getScene |
---|
public Scene getScene() Gets the current scene. If a new scene has been set, but the transition is not yet complete,
previous scene might be returned. Returns:
The current scene |
logicalToScreenX | ||
---|---|---|
public float logicalToScreenX( float x ) Converts stage x to screen x coordination using the scaling factor. Parameters:
Returns:
Screen x |
logicalToScreenY | ||
---|---|---|
public float logicalToScreenY( float y ) Converts stage y to screen y coordination using the scaling factor. Parameters:
Returns:
Screen y |
removeFilter | ||
---|---|---|
public void removeFilter( PostProcessingFilter filter ) Removes a post-processing filter from the rendering pipeline. Parameters:
|
screenToLogicalX | ||
---|---|---|
public float screenToLogicalX( float x ) Converts screen x to stage x coordination using the scaling factor. Parameters:
Returns:
Stage x |
screenToLogicalY | ||
---|---|---|
public float screenToLogicalY( float y ) Converts screen y to stage x coordination using the scaling factor. Parameters:
Returns:
Stage y |
setLoadingBackColor | ||
---|---|---|
public void setLoadingBackColor( RGB bgColor ) Sets the background color of the loading screen. Parameters:
|
setManager | ||
---|---|---|
public void setManager( StageManager stageManager ) Sets the stage manager responsible for handling required functionality for this
Stage. You MUST assign a stage manager before doing anything else with this
Stage. Parameters:
|
setScene | ||
---|---|---|
public void setScene( Scene scene ) Sets the next scene that should be shown on this Stage. The scene will not be shown
immediately and will go through a transition effect and possibly a local loading procedure. Parameters:
|