use of com.esotericsoftware.spine.AnimationState in project bladecoder-adventure-engine by bladecoder.
the class SpineRenderer method retrieveSource.
private void retrieveSource(String source, String atlas) {
EngineLogger.debug("Retrieving: " + source);
SkeletonCacheEntry entry = (SkeletonCacheEntry) sourceCache.get(source);
if (entry == null || entry.refCounter < 1) {
loadSource(source, atlas);
EngineAssetManager.getInstance().finishLoading();
entry = (SkeletonCacheEntry) sourceCache.get(source);
}
if (entry.skeleton == null) {
SkeletonData skeletonData = EngineAssetManager.getInstance().get(getFileName(source), SkeletonData.class);
entry.skeleton = new Skeleton(skeletonData);
// Defines
AnimationStateData stateData = new AnimationStateData(skeletonData);
// mixing
// between
// animations.
stateData.setDefaultMix(0f);
entry.animation = new AnimationState(stateData);
entry.animation.addListener(animationListener);
}
}
Aggregations