/** * @see net.wombatrpgs.rainfall.screen.Screen#queueRequiredAssets * (com.badlogic.gdx.assets.AssetManager) */ @Override public void queueRequiredAssets(AssetManager manager) { if (font != null) { font.queueRequiredAssets(manager); } if (box != null) { box.queueRequiredAssets(manager); } }
/** * @see net.wombatrpgs.rainfall.core.GameScreen#postProcessing * (com.badlogic.gdx.assets.AssetManager, int pass) */ @Override public void postProcessing(AssetManager manager, int pass) { if (pass > 0) return; if (font != null) { font.postProcessing(manager, pass); } if (box != null) { box.postProcessing(manager, pass); } }
/** @see net.wombatrpgs.rainfall.screen.Screen#render() */ @Override public void render() { super.render(); batch.begin(); defaultFont.draw(batch, "FPS: " + Gdx.graphics.getFramesPerSecond(), 8, 16); batch.end(); // this is actually legal wtf, used to be to-do here getBatch().begin(); if (box != null) box.render(cam); getBatch().end(); }
public TestScreen() { super(); MapLoadTestMDO mapTestMDO = RGlobal.data.getEntryFor("map_test", MapLoadTestMDO.class); Level map = RGlobal.levelManager.getLevel(mapTestMDO.map); this.canvas = map; TextBoxTestMDO testMDO = RGlobal.data.getEntryFor("test_textbox", TextBoxTestMDO.class); if (testMDO != null && testMDO.enabled == TestState.ENABLED) { FontMDO fontMDO = RGlobal.data.getEntryFor(testMDO.font, FontMDO.class); font = new FontHolder(fontMDO); TextBoxMDO textMDO = RGlobal.data.getEntryFor(testMDO.box, TextBoxMDO.class); box = new TextBox(textMDO, font); box.setText(testMDO.text); } commandContext = new TestCommandMap(); z = 0; defaultFont = new BitmapFont(); batch = new SpriteBatch(); cam.track(RGlobal.hero); init(); }