public class WorldRenderer
extends java.lang.Object
Constructor and Description |
---|
WorldRenderer(com.jonathan.survivor.World world,
com.badlogic.gdx.graphics.g2d.SpriteBatch batcher)
Creates a WorldRenderer instance used to draw the given world instance with the given SpriteBatch.
|
Modifier and Type | Method and Description |
---|---|
com.badlogic.gdx.graphics.OrthographicCamera |
getWorldCamera()
Retrieves the world camera used to render the world.
|
void |
getWorldCamera(com.badlogic.gdx.graphics.OrthographicCamera worldCamera)
Sets the world camera used to render the world.
|
void |
render(float deltaTime)
Called every frame to render the contents of the world and update the camera.
|
void |
resize(float worldWidth,
float worldHeight,
float screenScale)
Called when the screen is resized, or when the world renderer is first created.
|
void |
updateCamera()
Called every frame when the game is running to update the position of the camera.
|
public WorldRenderer(com.jonathan.survivor.World world, com.badlogic.gdx.graphics.g2d.SpriteBatch batcher)
public void updateCamera()
public void render(float deltaTime)
public com.badlogic.gdx.graphics.OrthographicCamera getWorldCamera()
public void getWorldCamera(com.badlogic.gdx.graphics.OrthographicCamera worldCamera)
public void resize(float worldWidth, float worldHeight, float screenScale)