Class BackgroundRenderComponent

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Renderable, Comparable<Renderable>

public class BackgroundRenderComponent extends TextureRenderComponent
BackgroundRenderComponent is a specialized component for rendering background textures. It extends TextureRenderComponent and sets a default layer for the background rendering.
  • Constructor Details

    • BackgroundRenderComponent

      public BackgroundRenderComponent(String texturePath)
      Constructor that initializes the background with a texture path.
      Parameters:
      texturePath - the file path of the texture to be rendered as the background.
  • Method Details

    • getLayer

      public int getLayer()
      Overrides the getLayer method to return the default layer. This ensures that the background is always rendered on the specified layer.
      Specified by:
      getLayer in interface Renderable
      Overrides:
      getLayer in class TextureRenderComponent
      Returns:
      the layer on which the background should be rendered.