Skip to content

Instantly share code, notes, and snippets.

@Tom-Ski
Created February 15, 2014 04:07
Show Gist options
  • Save Tom-Ski/9014413 to your computer and use it in GitHub Desktop.
Save Tom-Ski/9014413 to your computer and use it in GitHub Desktop.
This stuff
AtlasAttachmentLoader atlasLoader = new AtlasAttachmentLoader(atlas) {
public RegionAttachment newRegionAttachment (Skin skin, String name, String path) {
Box2dAttachment attachment = new Box2dAttachment(name);
AtlasRegion region = atlas.findRegion(attachment.getName());
if (region == null) throw new RuntimeException("Region not found in atlas: " + attachment);
attachment.setRegion(region);
return attachment;
}
};
SkeletonJson json = new SkeletonJson(atlasLoader);
json.setScale(0.05f);
SkeletonData skeletonData = json.readSkeletonData(Gdx.files.internal("spineboy.json"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment