Class TextureRenderWithRotationComponent

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

public class TextureRenderWithRotationComponent extends TextureRenderComponent
An extension of the TextureRenderComponent, which allows rotation of your textures. Just need to specify the angle of rotation in terms of degrees.
  • Constructor Details

    • TextureRenderWithRotationComponent

      public TextureRenderWithRotationComponent(String texturePath)
  • Method Details

    • setRotation

      public void setRotation(float value)
      Set the rotation value this rendering component will use to rotate the texture.
      Parameters:
      value - The rotation value, in degrees.
    • setRotationWithRepeat

      public void setRotationWithRepeat(float value)
    • getRotation

      public float getRotation()
    • draw

      protected void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Description copied from class: RenderComponent
      Draw the renderable. Should be called only by the renderer, not manually.
      Overrides:
      draw in class TextureRenderComponent
      Parameters:
      batch - Batch to render to.