Class Scene
java.lang.Object
org.indiumstudios.keylib.SceneManagment.Scene
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeletes all objects.voidDestroys the scene's stage.voiddispose()Dispose the scene.protected voidAny extra rendering that is needed.protected voidAny extra setup that is needed.protected com.badlogic.gdx.graphics.g2d.BatchgetBatch()Gets the stage's batch.protected voidAll ImGui rendering.voidsetAsCurrent(boolean firstScene) Sets this scene as the current scene.protected voidsetBGColor(@NotNull RGBAc color) Sets the background color.protected voidsetBGColor(@NotNull RGBc color) Sets the background color.protected voidsetIsRendering(boolean isRendering) Sets whether the scene other than ImGui is getting rendered.protected voidStop all the sounds.protected voidUpdates the object list.
-
Field Details
-
objects
-
music
-
-
Constructor Details
-
Scene
public Scene()
-
-
Method Details
-
extraSetup
protected void extraSetup()Any extra setup that is needed. -
extraRendering
protected void extraRendering()Any extra rendering that is needed. -
renderImGui
protected void renderImGui()All ImGui rendering. -
setAsCurrent
public void setAsCurrent(boolean firstScene) Sets this scene as the current scene.- Parameters:
firstScene- Whether this is the first scene or not. First scenes must always be set current.
-
stopAllSounds
protected void stopAllSounds()Stop all the sounds. -
setBGColor
Sets the background color.- Parameters:
color- An RGBA color for the background color: Red, Green, Blue, Alpha. Example for white: new RGBA(255, 255, 255 ,255).
-
setBGColor
Sets the background color.- Parameters:
color- An RGB color for the background color: Red, Green, Blue. Example for white: new RGB(255, 255, 255).
-
updateObjects
protected void updateObjects()Updates the object list. -
deleteAllObjects
protected void deleteAllObjects()Deletes all objects. -
setIsRendering
protected void setIsRendering(boolean isRendering) Sets whether the scene other than ImGui is getting rendered.- Parameters:
isRendering- Whether the scene is getting rendered.
-
getBatch
protected com.badlogic.gdx.graphics.g2d.Batch getBatch()Gets the stage's batch.- Returns:
- The stage's batch.
-
dispose
public void dispose()Dispose the scene.- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable
-
destroyScene
public void destroyScene()Destroys the scene's stage. Scene should not be used after.
-