Class MinigameRenderer

java.lang.Object
com.csse3200.game.minigames.MinigameRenderer

public class MinigameRenderer extends Object
Class to help render minigame things for snake and birdie dash. Includes spritebatch and camera. The camera allows resizing to be done easily.
  • Constructor Details

    • MinigameRenderer

      public MinigameRenderer()
  • Method Details

    • addRenderable

      public void addRenderable(MinigameRenderable renderable)
      Add a thing to render (class that implements MinigameRenderable with render method)
      Parameters:
      renderable - class to render
    • render

      public void render()
      Render all classes
    • renderBackground

      public void renderBackground()
      Render background for sprite batch
    • resize

      public void resize(int width, int height)
      Resize the screen
      Parameters:
      width - new width of the screen
      height - new height of the screen
    • getSb

      public com.badlogic.gdx.graphics.g2d.SpriteBatch getSb()
      Getter for the sprite batch
      Returns:
      the sprite batch
    • getCam

      public com.badlogic.gdx.graphics.OrthographicCamera getCam()
      Getter for the camera
      Returns:
      the camera
    • dispose

      public void dispose()
      Dispose of the sprite batch