瀏覽代碼

Fixed animation state delay when not set right away (spine-js).

NathanSweet 12 年之前
父節點
當前提交
ee4ad778af
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      spine-js/spine.js

+ 3 - 4
spine-js/spine.js

@@ -1110,10 +1110,9 @@ spine.AnimationState.prototype = {
 			this.tracks[trackIndex] = entry;
 			this.tracks[trackIndex] = entry;
 
 
 		if (delay <= 0) {
 		if (delay <= 0) {
-			if (last) {
-				if (last.time < last.endTime) delay += last.endTime - last.time;
-				delay -= this.data.getMix(last.animation, animation);
-			} else
+			if (last)
+				delay += last.endTime - this.data.getMix(last.animation, animation);
+			else
 				delay = 0;
 				delay = 0;
 		}
 		}
 		entry.delay = delay;
 		entry.delay = delay;