java.lang.Object
org.indiumstudios.keylib.SceneManagment.Scene
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public abstract class Scene extends Object implements com.badlogic.gdx.utils.Disposable
  • Field Details

    • objects

      protected ArrayList<com.badlogic.gdx.scenes.scene2d.Actor> objects
    • music

      protected ArrayList<Audio> 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

      protected void setBGColor(@NotNull @NotNull RGBAc color)
      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

      protected void setBGColor(@NotNull @NotNull RGBc color)
      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:
      dispose in interface com.badlogic.gdx.utils.Disposable
    • destroyScene

      public void destroyScene()
      Destroys the scene's stage. Scene should not be used after.