瀏覽代碼

[libgdx] Fixed AnimationState.trackEntry()

Some TrackEntry fields weren't reset to their default values. @NathanSweet you did a bug
Luke Ingram 3 年之前
父節點
當前提交
fd617b562e
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 1 1
      formatters/README.md
  2. 5 1
      spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

+ 1 - 1
formatters/README.md

@@ -4,7 +4,7 @@ This folder contains formatter configuration files to be used with IDEs as well
 You will need the following on your `PATH`:
 You will need the following on your `PATH`:
 
 
 - JDK 10+
 - JDK 10+
-- clang-format 12 (i.e. `brew install clang-format`). Also set the environment variable `CLANGFORMAT` to the path of the `clang-format` executable.
+- clang-format 12.0.1 (i.e. `brew install clang-format`). Also set the environment variable `CLANGFORMAT` to the path of the `clang-format` executable.
 - dotnet format (i.e. `dotnet tool install -g dotnet-format`, comes with dotnet 6 out of the box)
 - dotnet format (i.e. `dotnet tool install -g dotnet-format`, comes with dotnet 6 out of the box)
 - tsfmt, (i.e. `npm install -g typescript-formatter`)
 - tsfmt, (i.e. `npm install -g typescript-formatter`)
 
 

+ 5 - 1
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

@@ -703,6 +703,9 @@ public class AnimationState {
 		entry.loop = loop;
 		entry.loop = loop;
 		entry.holdPrevious = false;
 		entry.holdPrevious = false;
 
 
+		entry.reverse = false;
+		entry.shortestRotation = false;
+
 		entry.eventThreshold = 0;
 		entry.eventThreshold = 0;
 		entry.attachmentThreshold = 0;
 		entry.attachmentThreshold = 0;
 		entry.drawOrderThreshold = 0;
 		entry.drawOrderThreshold = 0;
@@ -720,9 +723,10 @@ public class AnimationState {
 		entry.timeScale = 1;
 		entry.timeScale = 1;
 
 
 		entry.alpha = 1;
 		entry.alpha = 1;
-		entry.interruptAlpha = 1;
 		entry.mixTime = 0;
 		entry.mixTime = 0;
 		entry.mixDuration = last == null ? 0 : data.getMix(last.animation, animation);
 		entry.mixDuration = last == null ? 0 : data.getMix(last.animation, animation);
+		entry.interruptAlpha = 1;
+		entry.totalAlpha = 0;
 		entry.mixBlend = MixBlend.replace;
 		entry.mixBlend = MixBlend.replace;
 		return entry;
 		return entry;
 	}
 	}