SHARE
TWEET

Untitled

a guest Oct 13th, 2015 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.mygdx.game;
  2.  
  3. import com.badlogic.gdx.ApplicationAdapter;
  4. import com.badlogic.gdx.Gdx;
  5. import com.badlogic.gdx.graphics.GL20;
  6. import com.badlogic.gdx.graphics.OrthographicCamera;
  7. import com.badlogic.gdx.graphics.Texture;
  8. import com.badlogic.gdx.graphics.g2d.Sprite;
  9. import com.badlogic.gdx.graphics.g2d.SpriteBatch;
  10. import com.badlogic.gdx.graphics.g2d.TextureRegion;
  11. import com.badlogic.gdx.math.Vector2;
  12.  
  13. public class FootBallsv0 extends ApplicationAdapter {
  14.     OrthographicCamera camera;
  15.     SpriteBatch batch;
  16.     Texture textureBG;
  17.     Sprite sprite;
  18.  
  19.        
  20.         @Override
  21.         public void create () {
  22.         camera = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
  23.  
  24.         batch = new SpriteBatch();
  25.  
  26.         textureBG = new Texture("pitch_final.png");
  27.         textureBG.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
  28.  
  29.         sprite = new Sprite(textureBG);
  30.  
  31.     }
  32.  
  33.         @Override
  34.         public void render () {
  35.                 Gdx.gl.glClearColor(1, 1, 1, 1);
  36.                 Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  37.  
  38.         batch.setProjectionMatrix(camera.combined);
  39.                 batch.begin();
  40.                 batch.draw(textureBG, 0, 0);
  41.                 batch.end();
  42.         }
  43.  
  44.     @Override
  45.     public void resize(int width, int height) {
  46.  
  47.     }
  48. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top