Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.newrog.myGame;
- import com.badlogic.gdx.ApplicationListener;
- import com.badlogic.gdx.Gdx;
- import com.badlogic.gdx.graphics.GL10;
- import com.badlogic.gdx.graphics.OrthographicCamera;
- import com.badlogic.gdx.graphics.g2d.SpriteBatch;
- public class MyGdxGame implements ApplicationListener {
- private OrthographicCamera camera;
- private SpriteBatch batch;
- Logo logo;
- @Override
- public void create() {
- float w = Gdx.graphics.getWidth();
- float h = Gdx.graphics.getHeight();
- camera = new OrthographicCamera(w, h);
- camera.setToOrtho(false);
- batch = new SpriteBatch();
- logo = new Logo(100, 50);
- }
- @Override
- public void dispose() {
- batch.dispose();
- }
- public void update(){
- logo.update();
- }
- @Override
- public void render() {
- update();
- Gdx.gl.glClearColor(1, 1, 1, 1);
- Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
- batch.setProjectionMatrix(camera.combined);
- batch.begin();
- logo.render(batch);
- batch.end();
- }
- @Override
- public void resize(int width, int height) {
- }
- @Override
- public void pause() {
- }
- @Override
- public void resume() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement