Created
February 15, 2014 04:07
-
-
Save Tom-Ski/9014413 to your computer and use it in GitHub Desktop.
This stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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