Advertisement
Guest User

Untitled

a guest
Aug 5th, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. package com.sirtrashyton;
  2.  
  3. import box2dLight.RayHandler;
  4. import com.badlogic.gdx.ApplicationAdapter;
  5. import com.badlogic.gdx.Gdx;
  6. import com.badlogic.gdx.graphics.GL20;
  7. import com.badlogic.gdx.graphics.Texture;
  8. import com.badlogic.gdx.graphics.g2d.SpriteBatch;
  9. import com.badlogic.gdx.math.Vector2;
  10. import com.badlogic.gdx.physics.box2d.Box2DDebugRenderer;
  11. import com.badlogic.gdx.physics.box2d.World;
  12.  
  13. public class Game extends ApplicationAdapter {
  14. SpriteBatch batch;
  15. Texture img;
  16. public World w;
  17.  
  18. @Override
  19. public void create () {
  20. batch = new SpriteBatch();
  21. img = new Texture("badlogic.jpg");
  22. Box2DDebugRenderer debug = new Box2DDebugRenderer();
  23. w = new World(new Vector2(0f, 0f), false);
  24. }
  25.  
  26. @Override
  27. public void render () {
  28. Gdx.gl.glClearColor(1, 0, 0, 1);
  29. Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  30. batch.begin();
  31. batch.draw(img, 0, 0);
  32. batch.end();
  33. }
  34.  
  35. @Override
  36. public void dispose () {
  37. batch.dispose();
  38. img.dispose();
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement