Example usage for com.badlogic.gdx Application LOG_ERROR

List of usage examples for com.badlogic.gdx Application LOG_ERROR

Introduction

In this page you can find the example usage for com.badlogic.gdx Application LOG_ERROR.

Prototype

int LOG_ERROR

To view the source code for com.badlogic.gdx Application LOG_ERROR.

Click Source Link

Usage

From source file:be.ac.ucl.lfsab1509.bouboule.game.MyGame.java

License:Open Source License

@Override
public void create() {
    // TODO Prod: LOG_ERROR
    Gdx.app.setLogLevel(Application.LOG_ERROR);

    Gdx.app.log("Matth", "Game: Create");
    hitSounds = new Sound[5];
    hitSounds[0] = Gdx.audio.newSound(Gdx.files.internal("music/sounds/hit1.mp3"));
    hitSounds[1] = Gdx.audio.newSound(Gdx.files.internal("music/sounds/hit2.mp3"));
    hitSounds[2] = Gdx.audio.newSound(Gdx.files.internal("music/sounds/hit3.mp3"));
    hitSounds[3] = Gdx.audio.newSound(Gdx.files.internal("music/sounds/hit4.mp3"));
    hitSounds[4] = Gdx.audio.newSound(Gdx.files.internal("music/sounds/hit5.mp3"));
    rand = new Random();

    countdownSound = Gdx.audio.newSound(Gdx.files.internal("music/sounds/countdown.mp3"));

    if (GlobalSettings.GAME == null) // should not happen on Android!!!
        init(true);//from  w  ww .  ja v a 2 s .  c  o m

    if (bNeedEndSounds) {
        winSound = Gdx.audio.newSound(Gdx.files.internal("music/sounds/win.mp3"));
        looseSound = Gdx.audio.newSound(Gdx.files.internal("music/sounds/loose.mp3"));
    }

    camera = CameraHelper.getCamera(GlobalSettings.APPWIDTH, GlobalSettings.APPHEIGHT);

    if (GlobalSettings.MENUS == null) {
        bGdxMenus = true;
        GlobalSettings.MENUS = new GdxMenus();
        GlobalSettings.MENUS.launchInitMenu();
    } else // e.g. Android => there is only one screen: Screen Game
        setScreenGame();
}

From source file:com.agateau.utils.log.NLog.java

License:Apache License

public static void e(Object obj, Object... args) {
    print(Application.LOG_ERROR, obj, args);
}

From source file:com.bladecoder.engine.util.EngineLogger.java

License:Apache License

public static void toggle() {
    if (level == Application.LOG_DEBUG)
        level = Application.LOG_ERROR;
    else/* ww  w.ja va  2  s.c  om*/
        level = Application.LOG_DEBUG;

    Gdx.app.setLogLevel(level);
}

From source file:com.explatcreations.sft.Game.java

License:Open Source License

@Override
public void create() {
    Gdx.app.setLogLevel(Application.LOG_ERROR);
    Game.world = new World();
    refreshJoypadHelper();//from w w w  .j ava  2 s  .  c  o  m
    Game.globals.IsDemo |= Game.world.getLevel(LevelIndex.Last) == null;
    Game.audio = new AudioManager();
    Game.assets = new Assets();
    setIcons();
    Game.mode = new ModeManager();
    Game.screenStretcher = new ScreenStretcher();
    Game.sepiaizer = new Sepiaizer();
    this.engine = new Engine();
    if (Game.globals.DisplayHardware) {
        System.out.println(new HardwareInfo().toString());
        exit();
    }
    if (Game.globals.DiagnoseGamepad) {
        diagnoseGamepad();
    }
}

From source file:com.mangecailloux.pebble.screens.ScreenManager.java

License:Apache License

@Override
protected void onDebug(boolean _debug) {
    if (Gdx.app != null) {
        if (_debug)
            Gdx.app.setLogLevel(Application.LOG_DEBUG);
        else//from   w  w w.j av  a  2  s  .c om
            Gdx.app.setLogLevel(Application.LOG_ERROR);
    }
}

From source file:com.mrandmrsjian.freakingsum.DirectedGame.java

License:Apache License

@Override
public void create() {
    // Set Libgdx log level
    Gdx.app.setLogLevel(Application.LOG_DEBUG);

    // Load assets
    Assets.instance.init(new AssetManager());

    screenWidth = 480;//w  ww  .jav a 2s . c  om
    screenHeight = 480 * Gdx.graphics.getHeight() / Gdx.graphics.getWidth();
    Gdx.app.debug(TAG, "w=" + screenWidth + ", h=" + screenHeight);
    camera = new OrthographicCamera();
    camera.position.set(screenWidth / 2, screenHeight / 2, 0);
    viewport = new FitViewport(screenWidth, screenHeight, camera);
    soundEnabled = loadSoundStatus();
    soundVolume = loadSoundVolume();

    prepareLeaderBoard();

    switch (Gdx.app.getType()) {
    case Android:
        isAndroid = true;
        Gdx.app.setLogLevel(Application.LOG_ERROR);
        break;
    case Desktop:
        Gdx.app.setLogLevel(Application.LOG_DEBUG);
        // desktop specific code
        break;
    case WebGL:
        // HTML5 specific code
        break;
    case iOS:
        break;
    default:
        // Other platforms specific code
    }

    // Start game at menu screen
    ScreenTransition transition = ScreenTransitionSlice.init(2, ScreenTransitionSlice.UP_DOWN, 10,
            Interpolation.pow5Out);
    setScreen(new MenuScreen(this), transition);
}

From source file:de.gebatzens.meteva.GScout.java

License:Open Source License

@Override
public void create() {

    //For testing
    trace = false;// w ww .  j av  a 2 s .c o m

    if (trace)
        tracei.beginTrace("initmeteva");
    batch = new SpriteBatch();
    atlas = new TextureAtlas(Gdx.files.internal("all.pack"));
    sbg = new SpaceBackground();
    sbg.initBackground();
    settings = new Settings();
    settings.load();
    highscoren = new Highscore();
    highscoren.load(false);
    highscoref = new Highscore();
    highscoref.load(true);
    mprof = new MarketProfile();
    mprof.load();
    mprof.reset();
    Gdx.app.setLogLevel(Application.LOG_ERROR);

    manager = new AssetManager();
    locale = Locale.getDefault();
    bundle = I18NBundle.createBundle(Gdx.files.internal("lang/bundle"), locale);
    Gdx.app.debug("Meteva", "using locale " + locale);

    for (int i = 0; i < 4; i++) {
        meteorExpl[i] = Gdx.audio.newSound(Gdx.files.internal("sounds/expl" + (i + 1) + ".ogg"));
    }
    playerExpl = Gdx.audio.newSound(Gdx.files.internal("sounds/raumschiffexpl.ogg"));
    laser = Gdx.audio.newSound(Gdx.files.internal("sounds/laser.ogg"));
    rush = Gdx.audio.newMusic(Gdx.files.internal("sounds/rush.mp3"));
    rush.setLooping(true);
    if (settings.musicEnabled())
        rush.play();

    Texture tex = new Texture(Gdx.files.internal("survivant.png"));
    tex.setFilter(TextureFilter.Linear, TextureFilter.Linear);
    survivant = new BitmapFont(Gdx.files.internal("survivant.fnt"), new TextureRegion(tex), false);
    fontShader = new ShaderProgram(Gdx.files.internal("font.vert"), Gdx.files.internal("font.frag"));

    if (!fontShader.isCompiled()) {
        Gdx.app.error("fontShader", "compilation failed:\n" + fontShader.getLog());
    }

    Pixmap p = new Pixmap(1, 1, Format.RGBA8888);
    p.setColor(Color.WHITE);
    p.drawPixel(0, 0);
    whiteTexture = new Texture(p);
    p.dispose();

    //   camera = new OrthographicCamera(1920, 1080);
    //   camera.setToOrtho(true, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
    //   camera.setToOrtho(true);

    InputMultiplexer im = new InputMultiplexer();
    im.addProcessor(this);

    GestureDetector gd = new GestureDetector(this);
    im.addProcessor(gd);

    Gdx.input.setInputProcessor(im);

    width = Gdx.graphics.getWidth();
    height = Gdx.graphics.getHeight();

    musicb = new SoundButton(GScout.width * 0.022f, GScout.height * 0.02f, GScout.getRegion("ton"),
            GScout.getRegion("tonaus"), GScout.width * 0.065f);
    musicb.activated = !settings.musicEnabled();
    soundb = new SoundButton(GScout.width * 0.022f + 0.07f * GScout.width, GScout.height * 0.02f,
            GScout.getRegion("spielton"), GScout.getRegion("spieltonaus"), GScout.width * 0.065f);
    soundb.activated = !settings.soundsEnabled();

    state = new MainState();
    state.init();

    if (trace)
        tracei.endTrace();

}

From source file:org.zapylaev.game.truetennis.core.TrueTennisMain.java

License:Open Source License

@Override
public void create() {
    Assets.getInstance().init();
    setScreen(new StartScreen(this));
    Gdx.app.setLogLevel(Application.LOG_ERROR);
}