Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.reed.sidescroller;
- import com.badlogic.gdx.Game;
- import com.badlogic.gdx.Gdx;
- import com.badlogic.gdx.Screen;
- import com.badlogic.gdx.graphics.GL10;
- import com.badlogic.gdx.graphics.OrthographicCamera;
- import com.badlogic.gdx.graphics.g2d.SpriteBatch;
- public class MainMenuScreen implements Screen {
- Game game;
- OrthographicCamera camera;
- SpriteBatch batch;
- public MainMenuScreen(Game game) {
- this.game = game;
- camera = new OrthographicCamera(Gdx.graphics.getWidth(),
- Gdx.graphics.getHeight());
- camera.setToOrtho(true, Gdx.graphics.getWidth(),
- Gdx.graphics.getHeight());
- batch = new SpriteBatch();
- System.out.println("mainmenuscreenend");
- }
- @Override
- public void render(float delta) {
- Gdx.gl.glClearColor(255f, 255f, 255f, 1);
- Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
- camera.update();
- batch.begin();
- batch.draw(Assets.blueGem, 200, 200);
- batch.end();
- System.out.println("render");
- }
- @Override
- public void resize(int width, int height) {
- System.out.println("resize");
- }
- @Override
- public void show() {
- System.out.println("show");
- }
- @Override
- public void hide() {
- System.out.println("hide");
- }
- @Override
- public void pause() {
- System.out.println("pause");
- }
- @Override
- public void resume() {
- System.out.println("resume");
- }
- @Override
- public void dispose() {
- System.out.println("dispose");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement