SHARE
TWEET
Untitled
a guest
Nov 28th, 2016
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- public class GameProject extends Game{
- public static final int WIDTH = 1280;
- public static final int HEIGHT = 720;
- public static ActionResolver actionResolver;
- private SpriteBatch batch;
- private OrthographicCamera cam;
- private AssetManager manager = new AssetManager();
- public GameProject(ActionResolver actionResolver) {
- super();
- GameProject.actionResolver = actionResolver;
- }
- @Override
- public void create () {
- batch = new SpriteBatch();
- cam = new OrthographicCamera();
- cam.setToOrtho(false, WIDTH, HEIGHT);
- manager.load("sprites/player.png", Texture.class);
- manager.load("sprites/health.png", Texture.class);
- }
- public void render() {
- if(manager.update()) {
- setScreen(new PlayScreen(this));
- }
- }
- public SpriteBatch getSpriteBatch() { return batch; }
- public OrthographicCamera getCamera() { return cam; }
- public AssetManager getManager(){return manager;}
- public void dispose(){
- batch.dispose();
- }
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

