Guest User

Untitled

a guest
Sep 26th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.14 KB | None | 0 0
  1. public class MainScreen implements Screen {
  2.     MyGame game;
  3.     private int screenWidth=1000;
  4.     private int screenHeight=2000;
  5.     private OrthographicCamera camera;
  6.     private Viewport view;
  7.     public Texture background;
  8.  
  9.  
  10.     public MainScreen(MyGame game) {
  11.         game = game;
  12.         camera = new OrthographicCamera(screenWidth,screenHeight);
  13.         camera.setToOrtho(false, screenWidth, screenHeight);
  14.         view = new StretchViewport(screenWidth, screenHeight, camera);
  15.         view.apply();
  16.         background = new Texture(Gdx.files.internal("testSplash.png"));
  17.     }
  18.     @Override
  19.     public void show() {
  20.        
  21.     }
  22.  
  23.     @Override
  24.     public void render(float delta) {
  25.        
  26.         tombstone.batch.begin();
  27.         tombstone.batch.draw(background,0,0,screenWidth,screenHeight);
  28.         tombstone.batch.end();
  29.     }
  30.  
  31.     @Override
  32.     public void resize(int width, int height) {
  33.        
  34.     }
  35.  
  36.     @Override
  37.     public void pause() {
  38.  
  39.     }
  40.  
  41.     @Override
  42.     public void resume() {
  43.  
  44.     }
  45.  
  46.     @Override
  47.     public void hide() {
  48.  
  49.     }
  50.  
  51.     @Override
  52.     public void dispose() {
  53.  
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment