Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainScreen implements Screen {
- MyGame game;
- private int screenWidth=1000;
- private int screenHeight=2000;
- private OrthographicCamera camera;
- private Viewport view;
- public Texture background;
- public MainScreen(MyGame game) {
- game = game;
- camera = new OrthographicCamera(screenWidth,screenHeight);
- camera.setToOrtho(false, screenWidth, screenHeight);
- view = new StretchViewport(screenWidth, screenHeight, camera);
- view.apply();
- background = new Texture(Gdx.files.internal("testSplash.png"));
- }
- @Override
- public void show() {
- }
- @Override
- public void render(float delta) {
- tombstone.batch.begin();
- tombstone.batch.draw(background,0,0,screenWidth,screenHeight);
- tombstone.batch.end();
- }
- @Override
- public void resize(int width, int height) {
- }
- @Override
- public void pause() {
- }
- @Override
- public void resume() {
- }
- @Override
- public void hide() {
- }
- @Override
- public void dispose() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment