Class CameraComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.CameraComponent

public class CameraComponent extends Component
CameraComponent to control aspects of the camera in game.
  • Constructor Details

    • CameraComponent

      public CameraComponent()
      Sets Orthographic Camera
    • CameraComponent

      public CameraComponent(com.badlogic.gdx.graphics.Camera camera)
      Used for camera reset/change
      Parameters:
      camera -
  • Method Details

    • update

      public void update()
      Description copied from class: Component
      Called once per frame of the game, and should be used for most component logic. Not called if component is disabled.
      Overrides:
      update in class Component
    • getProjectionMatrix

      public com.badlogic.gdx.math.Matrix4 getProjectionMatrix()
      Getter for Projection Matrix
      Returns:
      Matrix4 Projection Matrix
    • getCamera

      public com.badlogic.gdx.graphics.Camera getCamera()
      Returns camera
      Returns:
      camera
    • resize

      public void resize(int screenWidth, int screenHeight, float gameWidth)
      Resizes the camera FOV
      Parameters:
      screenWidth -
      screenHeight -
      gameWidth -