Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. package kz.gmotion.games.screens;
  2.  
  3. import com.badlogic.gdx.Game;
  4. import com.badlogic.gdx.Gdx;
  5. import com.badlogic.gdx.Screen;
  6. import com.badlogic.gdx.graphics.GL20;
  7. import com.badlogic.gdx.graphics.OrthographicCamera;
  8. import com.badlogic.gdx.graphics.Texture;
  9. import com.badlogic.gdx.graphics.g2d.SpriteBatch;
  10. import com.badlogic.gdx.scenes.scene2d.InputEvent;
  11. import com.badlogic.gdx.scenes.scene2d.Stage;
  12. import com.badlogic.gdx.scenes.scene2d.ui.Image;
  13. import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
  14.  
  15. import kz.gmotion.games.actors.Bukva;
  16.  
  17.  
  18. public class GameScreen implements Screen {
  19. private Stage stage;
  20. private OrthographicCamera camera;
  21. private SpriteBatch batch;
  22. private Bukva bukva15;
  23. public GameScreen() {
  24.  
  25. }
  26.  
  27. @Override
  28. public void show() {
  29. stage = new Stage();
  30. camera = new OrthographicCamera(480,800);
  31. batch = new SpriteBatch();
  32. bukva15 = new Bukva(15);
  33. stage.addActor(bukva15);
  34. Gdx.input.setInputProcessor(stage);
  35.  
  36. }
  37.  
  38. @Override
  39. public void render(float delta) {
  40. Gdx.gl.glClearColor(248/255f, 161/255f, 89/255f, 1f);
  41. Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  42. batch.setProjectionMatrix(camera.combined);
  43. batch.begin();
  44. stage.draw();
  45. batch.end();
  46.  
  47. }
  48.  
  49. @Override
  50. public void resize(int width, int height) {
  51.  
  52. }
  53.  
  54. @Override
  55. public void pause() {
  56.  
  57. }
  58.  
  59. @Override
  60. public void resume() {
  61.  
  62. }
  63.  
  64. @Override
  65. public void hide() {
  66.  
  67. }
  68.  
  69. @Override
  70. public void dispose() {
  71. batch.dispose();
  72.  
  73. }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement