public MainMenuScreen(AsteroidShooterGame _game) { this.game = _game; camera = new OrthographicCamera(); camera.setToOrtho(false, AsteroidShooter.V_WIDTH, AsteroidShooter.V_HEIGHT); batch = game.getSpriteBatch(); font = new BitmapFont(); }
@Override public void render(float deltaTime) { Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); camera.update(); batch.setProjectionMatrix(camera.combined); batch.begin(); font.draw(batch, "Welcome to RGBAsteroids!", 100, 150); batch.end(); if (Gdx.input.isTouched()) { game.setScreen(new AsteroidShooter()); } }