Coverage Summary for Class: HeadlessLauncher (io.github.unisim)
| Class |
Class, %
|
Method, %
|
Line, %
|
| HeadlessLauncher |
100%
(1/1)
|
75%
(3/4)
|
85.7%
(6/7)
|
package io.github.unisim;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.backends.headless.HeadlessApplication;
import com.badlogic.gdx.backends.headless.HeadlessApplicationConfiguration;
import io.github.unisim.Test;
/**
* Launches the headless application. Can be converted into a utilities project
* or a server application.
*/
public class HeadlessLauncher {
public static void main(String[] args) {
createApplication();
}
private static Application createApplication() {
// Note: you can use a custom ApplicationListener implementation for the
// headless project instead of Main.
return new HeadlessApplication(new Test(), getDefaultConfiguration());
}
private static HeadlessApplicationConfiguration getDefaultConfiguration() {
HeadlessApplicationConfiguration configuration = new HeadlessApplicationConfiguration();
configuration.updatesPerSecond = -1; // When this value is negative, Main#render() is never called.
//// If the above line doesn't compile, it is probably because the project
//// libGDX version is older.
//// In that case, uncomment and use the below line.
// configuration.renderInterval = -1f; // When this value is negative,
//// Main#render() is never called.
return configuration;
}
}