Hi, below you can see the last frame pose of a goblin in an "attack" animation:
Loading Image
This is what I see when I play the animation in Starling:
Loading Image
It seems the animation is not played completely to the end. It stops halfway or it seems like it stopped because of a reason I don't know yet.
This is the code:
public function Hero() {
var attachmentLoader:AttachmentLoader = new StarlingAtlasAttachmentLoader(Assets.getTextureAtlas('atlas0'));
var json:SkeletonJson = new SkeletonJson(attachmentLoader);
var skeletonData:SkeletonData = json.readSkeletonData(new GoblinsJson());
var stateData:AnimationStateData = new AnimationStateData(skeletonData);
stateData.setMixByName("walk", "attack", 0.2);
stateData.setMixByName("attack", "walk", 0.4);
skeleton = new SkeletonAnimation(skeletonData, true);
skeleton.skeleton.skinName = "goblingirl";
skeleton.skeleton.setSlotsToSetupPose();
skeleton.state.setAnimationByName(0, "walk", true);
addChild(skeleton);
Starling.juggler.add(skeleton);
addEventListener(TouchEvent.TOUCH, onClick);
}
private function onClick (event:TouchEvent) : void {
var touch:Touch = event.getTouch(this);
if (touch && touch.phase == TouchPhase.BEGAN) {
skeleton.state.setAnimationByName(0, "attack", false);
}
}
Any ideas?