Search in sources :

Example 1 with PlatformRelatedInterfaces

use of cn.s3bit.th902.PlatformRelatedInterfaces in project TH902 by cn-s3bit.

the class Launcher method main.

/**
 * Entry point.
 */
public static void main(String[] args) {
    Game game = new GameMain(new PlatformRelatedInterfaces() {

        @Override
        public IFont getFont(String fontName, boolean isBold, boolean isItalic, int size) {
            FreetypeFont font = new FreetypeFont();
            font.initialize(fontName, isBold, isItalic, size);
            return font;
        }

        @Override
        public void setFPS(int fps) {
            config.foregroundFPS = fps;
        }

        @Override
        public String[] getCommandLineParams() {
            return args;
        }
    });
    config = new LwjglApplicationConfiguration();
    config.fullscreen = false;
    config.width = 960;
    config.height = 720;
    config.resizable = false;
    config.title = GameMain.GAME_TITLE;
    config.foregroundFPS = 60;
    config.addIcon("resources/icon32.png", FileType.Internal);
    lwjglApplication = new LwjglApplication(game, config);
}
Also used : PlatformRelatedInterfaces(cn.s3bit.th902.PlatformRelatedInterfaces) Game(com.badlogic.gdx.Game) LwjglApplication(com.badlogic.gdx.backends.lwjgl.LwjglApplication) GameMain(cn.s3bit.th902.GameMain) LwjglApplicationConfiguration(com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration) IFont(cn.s3bit.th902.utils.IFont)

Aggregations

GameMain (cn.s3bit.th902.GameMain)1 PlatformRelatedInterfaces (cn.s3bit.th902.PlatformRelatedInterfaces)1 IFont (cn.s3bit.th902.utils.IFont)1 Game (com.badlogic.gdx.Game)1 LwjglApplication (com.badlogic.gdx.backends.lwjgl.LwjglApplication)1 LwjglApplicationConfiguration (com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration)1