From aa5282b39876846f79f596b5eac4eb1ecf8413e9 Mon Sep 17 00:00:00 2001 From: badlogic Date: Mon, 24 Oct 2016 15:13:14 +0200 Subject: [PATCH] [ts] Fixed setAnimation naming for string/ref arguments --- spine-ts/core/src/AnimationState.ts | 4 ++-- spine-ts/widget/src/Widget.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spine-ts/core/src/AnimationState.ts b/spine-ts/core/src/AnimationState.ts index d57f326c9..3c1f9a4b2 100644 --- a/spine-ts/core/src/AnimationState.ts +++ b/spine-ts/core/src/AnimationState.ts @@ -358,13 +358,13 @@ module spine { this.queue.start(current); } - setAnimationByName (trackIndex: number, animationName: string, loop: boolean) { + setAnimation (trackIndex: number, animationName: string, loop: boolean) { let animation = this.data.skeletonData.findAnimation(animationName); if (animation == null) throw new Error("Animation not found: " + animationName); return this.setAnimation(trackIndex, animation, loop); } - setAnimation (trackIndex: number, animation: Animation, loop: boolean) { + setAnimationWith (trackIndex: number, animation: Animation, loop: boolean) { if (animation == null) throw new Error("animation cannot be null."); let current = this.expandToIndex(trackIndex); if (current != null) { diff --git a/spine-ts/widget/src/Widget.ts b/spine-ts/widget/src/Widget.ts index 057d51c17..d25e0645e 100644 --- a/spine-ts/widget/src/Widget.ts +++ b/spine-ts/widget/src/Widget.ts @@ -143,7 +143,7 @@ module spine { } var animationState = this.state = new spine.AnimationState(new spine.AnimationStateData(skeleton.data)); - animationState.setAnimationByName(0, config.animation, true); + animationState.setAnimation(0, config.animation, true); if (config.success) config.success(this); this.loaded = true; requestAnimationFrame(() => { this.render(); }); @@ -246,7 +246,7 @@ module spine { setAnimation (animationName: string) { if (!this.loaded) throw new Error("Widget isn't loaded yet"); this.skeleton.setToSetupPose(); - this.state.setAnimationByName(0, animationName, this.config.loop); + this.state.setAnimation(0, animationName, this.config.loop); }