List of usage examples for com.badlogic.gdx Application LOG_DEBUG
int LOG_DEBUG
To view the source code for com.badlogic.gdx Application LOG_DEBUG.
Click Source Link
From source file:es.eucm.ead.engine.LoadingIndicatorDemo.java
License:Open Source License
@Override public void create() { Gdx.app.setLogLevel(Application.LOG_DEBUG); Gdx.gl.glClearColor(0f, 0f, 0f, 0f); stage = new Stage(new ScreenViewport()); WidgetGroup modalContainer = new WidgetGroup(); modalContainer.setFillParent(true);//from www .j av a 2 s. c o m WidgetGroup viewContainer = new WidgetGroup(); viewContainer.setFillParent(true); stage.getRoot().addActor(viewContainer); stage.getRoot().addActor(modalContainer); Gdx.input.setInputProcessor(stage); actor = new LoadingIndicator(); if (actor instanceof WidgetGroup) { ((WidgetGroup) actor).setFillParent(true); } viewContainer.addActor(actor); }
From source file:es.eucm.ead.repobuilder.LibPreview.java
License:Open Source License
private void previewLib() { final FileHandle libToPreview = availableLibs.get(libSelector.getSelectedIndex()); if (libToPreview != null) { FileHandle temp = FileHandle.tempDirectory("preview"); temp.mkdirs();//from w w w .ja va 2s .com ZipUtils.unzip(libToPreview, temp); EngineDesktop engine = new EngineDesktop(1800, 900) { @Override protected void dispose() { super.dispose(); libToPreview.deleteDirectory(); } }; engine.run(temp.path(), false); Gdx.app.setLogLevel(Application.LOG_DEBUG); SwingEDTUtils.invokeLater(new Runnable() { @Override public void run() { dispose(); } }); } }
From source file:free.hacknet.game.HackNetMain.java
License:Open Source License
@Override public void create() { Gdx.app.setLogLevel(Application.LOG_DEBUG); Assets.init();//from w w w .j a va 2 s .com fpsLogger = new FPSLogger(); this.setCurScreen(new mainTestEarthScreen()); }
From source file:free.hacknet.game.HackNetTestsMain.java
License:Open Source License
@Override public void create() { Gdx.app.setLogLevel(Application.LOG_DEBUG); Assets.init();/*from w ww .j a v a 2 s . co m*/ fpsLogger = new FPSLogger(); setCurScreen(new ListTestsScreen()); }
From source file:me.scarlet.undertailor.Undertailor.java
License:Open Source License
@Override public void create() { Undertailor.instance = this; Box2D.init();//from w w w. j a va2s. co m this.strict = 1; this.debug = true; this.console = new Console(); Thread.setDefaultUncaughtExceptionHandler((Thread t, Throwable e) -> { if (e instanceof LuaError) { this.error("lua", e.getMessage(), (Exception) e); } else { this.error("tailor", LuaUtil.formatJavaException((Exception) e), (Exception) e); } }); if (debug) { Gdx.app.setLogLevel(Application.LOG_DEBUG); } this.renderer = new MultiRenderer(); this.scriptManager = new ScriptManager(); this.scriptManager.registerLibraries(LIBS); this.scriptManager.registerImplementables(IMPLS); this.fontManager = new FontManager(); this.audioManager = new AudioManager(); this.styleManager = new StyleManager(); this.tilemapManager = new TilemapManager(); this.sheetManager = new SpriteSheetManager(); this.animationManager = new AnimationManager(); fontManager.loadObjects(new File(Undertailor.ASSETS_DIRECTORY, "fonts/")); audioManager.loadMusic(new File(Undertailor.ASSETS_DIRECTORY, "music/")); audioManager.loadSounds(new File(Undertailor.ASSETS_DIRECTORY, "sounds/")); sheetManager.loadObjects(new File(Undertailor.ASSETS_DIRECTORY, "sprites/")); tilemapManager.loadObjects(new File(Undertailor.ASSETS_DIRECTORY, "tilemaps/")); styleManager.loadObjects(new File(Undertailor.ASSETS_DIRECTORY, "fonts/styles/")); animationManager.loadObjects(new File(Undertailor.ASSETS_DIRECTORY, "animation/")); this.environmentManager = new EnvironmentManager(); this.inputRetriever = new InputRetriever(); Gdx.input.setInputProcessor(inputRetriever); environmentManager.getUIComponentLoader() .loadComponents(new File(Undertailor.ASSETS_DIRECTORY, "scripts/uicomponent/")); environmentManager.getWorldObjectLoader() .loadObjects(new File(Undertailor.ASSETS_DIRECTORY, "scripts/objects/")); environmentManager.getRoomLoader().loadScripts(new File(Undertailor.ASSETS_DIRECTORY, "scripts/rooms/")); environmentManager.getRoomLoader().loadObjects(new File(Undertailor.ASSETS_DIRECTORY, "rooms/")); renderer.clear(); File mainFile = new File(Undertailor.ASSETS_DIRECTORY, "main.lua"); if (mainFile.exists()) { Globals globals = scriptManager.generateGlobals(true); globals.loadfile(mainFile.getAbsolutePath()).invoke(); } else { error("tailor", "main.lua file not found; no start code was executed"); } disposer = new DisposerThread(); disposer.start(); }
From source file:net.mwplay.cocostudio.ui.DemoGame.java
License:Apache License
@Override public void create() { Gdx.app.setLogLevel(Application.LOG_DEBUG); //setScreen(new DemoScreen()); setScreen(new AMScreen()); }
From source file:org.ams.testapps.paintandphysics.cardhouse.Background.java
License:Open Source License
/** For drawing seamless textures. */ public Background() { if (debug)//from w w w .ja v a 2 s . c om Gdx.app.setLogLevel(Application.LOG_DEBUG); if (debug) debug("New instance."); polygonBatch = new PrettyPolygonBatch(); backgroundCamera = new OrthographicCamera(); }
From source file:org.ams.testapps.paintandphysics.cardhouse.CardMover.java
License:Open Source License
/** * Tool for moving cards around in order to build a card house. * * @param camera the camera that is used to draw the world. * @param world the world with cards and hopefully some ground for the cards to be on. *//*from ww w . ja v a 2s. c o m*/ public CardMover(OrthographicCamera camera, BoxWorld world) { if (debug) Gdx.app.setLogLevel(Application.LOG_DEBUG); debug("New instance."); turnCircleInner = new TurnCircle(camera, 2.2f, 0.8f); turnCircleInner.setDrawMarkers(false); turnCircleOuter = new TurnCircle(camera, 3, 0.5f); turnCircleOuter.setDrawAngleSquare(false); turnCircleOuter.setDrawMarkers(false); this.camera = camera; this.world = world; }
From source file:org.ams.testapps.paintandphysics.cardhouse.Tips.java
License:Open Source License
/** * Displays tips with an optional arrow that can point at stuff. * * @param key identifier for the preferences class * that is used to remember completed tips. *//*from w ww .ja va 2s .com*/ public Tips(String key, Stage stage, Skin skin) { if (debug) Gdx.app.setLogLevel(Application.LOG_DEBUG); if (debug) debug("Creating a new Tips instance with key" + key + "."); this.stage = stage; this.skin = skin; // for remembering completed tips preferences = Gdx.app.getPreferences(key + "Tips"); // for drawing arrows polygonBatch = new PrettyPolygonBatch(); // camera float w = Gdx.graphics.getWidth(); float h = Gdx.graphics.getHeight(); arrowCamera = new OrthographicCamera(10, 10 * (h / w)); updateArrowCamera(); }
From source file:org.ams.testapps.paintandphysics.cardhouse.TurnCircle.java
License:Open Source License
/** * A circle that is made to visualize the area one can touch to turn an object. * * @param camera The camera you draw the world with. * @param radius distance from center of circle to the inner part of the colored outline. * @param width the width of the colored outline. *//*from w w w . j a v a 2s . co m*/ public TurnCircle(OrthographicCamera camera, float radius, float width) { if (debug) Gdx.app.setLogLevel(Application.LOG_DEBUG); this.camera = camera; setColor(Color.PINK); // reasonable size for all densities this.radius = radius * (float) Math.pow(Gdx.graphics.getDensity(), 0.25); this.width = width * (float) Math.pow(Gdx.graphics.getDensity(), 0.25); // create triangles that together form a circle Array<Vector2> outer = makeCircle(new Vector2(), this.radius + this.width); Array<Vector2> inner = makeCircle(new Vector2(), this.radius); Array<Array<Vector2>> holes = new Array<Array<Vector2>>(); holes.add(inner); triangulatedCircle = Util.makeTriangles(outer, holes, false); }