Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.mygdx.game;
- import com.badlogic.gdx.ApplicationAdapter;
- import com.badlogic.gdx.graphics.OrthographicCamera;
- import com.badlogic.gdx.graphics.g2d.SpriteBatch;
- public class MyGdxGame extends ApplicationAdapter {
- public static OrthographicCamera camera;
- public int gamestate=1;
- public static MapManager mapManager;
- public void update_game()
- {
- /*
- if (gamestate == 0) {
- zastavka.update();
- }
- */
- if (gamestate == 1) {
- game.update();
- }
- }
- public void display_game() {
- /*
- if (gamestate == 0) {
- zastavka.display();
- }
- */
- if (gamestate == 1) {
- game.display();
- }
- }
- public GAME game;
- public SpriteBatch batch;
- @Override
- public void create () {
- mapManager=new MapManager();
- camera = new OrthographicCamera();
- camera.setToOrtho(false,320,240);
- game= new GAME();
- batch = new SpriteBatch(1000);
- }
- @Override
- public void render () {
- update_game();
- display_game();
- }
- @Override
- public void dispose () {
- batch.dispose();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement