Created
October 9, 2016 05:18
-
-
Save gwpantazes/c5d6867e27c2b181377ed1120b7d8cfb to your computer and use it in GitHub Desktop.
Why is setScreen broken?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.my.game; | |
import com.badlogic.gdx.ApplicationAdapter; | |
import com.badlogic.gdx.Game; // This import is reported as unused, but is needed for setScreen? | |
import com.badlogic.gdx.graphics.g2d.BitmapFont; | |
import com.badlogic.gdx.graphics.g2d.SpriteBatch; | |
public class Main extends ApplicationAdapter { | |
public SpriteBatch batch; | |
public BitmapFont font; | |
@Override | |
public void create() { | |
batch = new SpriteBatch(); | |
font = new BitmapFont(); | |
this.setScreen(new MainMenuScreen(this)); // setScreen isn't found? | |
} | |
@Override | |
public void render(){ | |
super.render(); | |
} | |
@Override | |
public void dispose() { | |
batch.dispose(); | |
font.dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment