Example usage for com.badlogic.gdx.maps.tiled TideMapLoader TideMapLoader

List of usage examples for com.badlogic.gdx.maps.tiled TideMapLoader TideMapLoader

Introduction

In this page you can find the example usage for com.badlogic.gdx.maps.tiled TideMapLoader TideMapLoader.

Prototype

public TideMapLoader() 

Source Link

Usage

From source file:com.trueMagic.maps.SectionLoader.java

public static void load() {
    TmxMapLoader tmxMapLoader = new TmxMapLoader();
    TideMapLoader tideMapLoader = new TideMapLoader();
    FileHandle mapFolder = Gdx.files.internal("Maps");
    if (mapFolder.isDirectory()) {
        FileHandle[] mapFiles = mapFolder.list();
        for (int i = 0; i < mapFiles.length; i++) {
            FileHandle mapFile = mapFiles[i];
            if (mapFile.extension().equals("tmx")) {
                maps.put(mapFile.nameWithoutExtension(), new MapSection(tmxMapLoader.load(mapFile.path())));
            } // else if(mapFile.extension().equals("tide")) {
              //   maps.put(mapFile.nameWithoutExtension(), new MapSection(tideMapLoader.load(mapFile.path())));
              //}
        }/*from w ww .  j a  v a  2  s. c  o  m*/
    }
}