use of com.esotericsoftware.spine.SkeletonBinary in project bladecoder-adventure-engine by bladecoder.
the class SkeletonDataLoader method loadAsync.
@Override
public void loadAsync(AssetManager manager, String fileName, FileHandle file, SkeletonDataLoaderParameter parameter) {
skeletonData = null;
TextureAtlas atlas = manager.get(parameter.atlasName, TextureAtlas.class);
String extension = file.extension();
if (extension.toLowerCase().equals("skel")) {
SkeletonBinary skeletonBinary = new SkeletonBinary(atlas);
skeletonBinary.setScale(parameter.scale);
skeletonData = skeletonBinary.readSkeletonData(file);
} else {
SkeletonJson skeletonJson = new SkeletonJson(atlas);
skeletonJson.setScale(parameter.scale);
skeletonData = skeletonJson.readSkeletonData(file);
}
}
Aggregations