use of com.esotericsoftware.spine.SkeletonBounds in project bladecoder-adventure-engine by bladecoder.
the class SpineRenderer method retrieveAssets.
@Override
public void retrieveAssets() {
renderer = new SkeletonRenderer();
renderer.setPremultipliedAlpha(false);
bounds = new SkeletonBounds();
for (String key : sourceCache.keySet()) {
if (sourceCache.get(key).refCounter > 0)
retrieveSource(key, ((SkeletonCacheEntry) sourceCache.get(key)).atlas);
}
if (currentAnimation != null) {
SkeletonCacheEntry entry = (SkeletonCacheEntry) sourceCache.get(currentAnimation.source);
currentSource = entry;
// Stop events to avoid event trigger
boolean prevEnableEvents = eventsEnabled;
eventsEnabled = false;
setCurrentAnimation();
eventsEnabled = prevEnableEvents;
} else if (initAnimation != null) {
startAnimation(initAnimation, Tween.Type.SPRITE_DEFINED, 1, null);
}
}
Aggregations