Search in sources :

Example 1 with WorldMap

use of me.dumfing.multiplayerTools.WorldMap in project Alkahest-Coffee by AlkahestDev.

the class CoffeeServer method render.

@Override
public void render() {
    for (BitmapFontCache bmfc : fonts) {
        bmfc.clear();
    }
    switch(svState) {
        case LOADING:
            if (Gdx.input.getInputProcessor() != loadingMenu) {
                loadingMenu.setInputProcessor();
            }
            if (loadingMenu.doneLoading()) {
                svState = ServerState.SERVERCONFIG;
                askConfig = createServerForm();
                serverInfo.init();
                serverRunningMenu.init();
            }
            loadingMenu.update();
            loadingMenu.draw(batch, shapeRenderer);
            break;
        case SERVERCONFIG:
            if (Gdx.input.getInputProcessor() != askConfig) {
                askConfig.setInputProcessor();
            }
            askConfig.update();
            askConfig.draw(batch, shapeRenderer);
            break;
        case GAMELOBBY:
            if (Gdx.input.getInputProcessor() != serverInfo) {
                serverInfo.setInputProcessor();
            }
            serverInfo.update(sv, redTeamMembers.size(), bluTeamMembers.size(), sv.getMaxPlayers());
            serverInfo.draw(batch, shapeRenderer);
            break;
        case RUNNINGGAME:
            if (Gdx.input.getInputProcessor() != serverRunningMenu) {
                serverRunningMenu.setInputProcessor();
                instance = new ServerGameInstance(sv.getPlayers());
                instance.setWorldMap(new WorldMap(MenuTools.mGTR("pixmapTest.png", manager), MenuTools.mGTR("pixmapVisual.png", manager)));
            //instance.world.setCollisionBoxes(Gdx.files.internal("pixmapTest.png"));
            }
            instance.update(sv);
            serverRunningMenu.updateMenuInfo(sv);
            serverRunningMenu.update();
            serverRunningMenu.draw(batch, shapeRenderer);
            break;
    }
}
Also used : WorldMap(me.dumfing.multiplayerTools.WorldMap) BitmapFontCache(com.badlogic.gdx.graphics.g2d.BitmapFontCache)

Example 2 with WorldMap

use of me.dumfing.multiplayerTools.WorldMap in project Alkahest-Coffee by AlkahestDev.

the class MainGame method createWorlds.

public void createWorlds() {
    WorldMap debugWorld = new WorldMap(MenuTools.mGTR("pixmapTest.png", assetManager), MenuTools.mGTR("pixmapVisual.png", assetManager));
    worldMaps = new WorldMap[] { debugWorld };
}
Also used : WorldMap(me.dumfing.multiplayerTools.WorldMap)

Aggregations

WorldMap (me.dumfing.multiplayerTools.WorldMap)2 BitmapFontCache (com.badlogic.gdx.graphics.g2d.BitmapFontCache)1