Browse Source

[csharp] Port of commit c2fe1a3, Added TrackEntry IsNextReady. See #2547.

Harald Csaszar 1 year ago
parent
commit
e73e3eeaa8
2 changed files with 9 additions and 1 deletions
  1. 8 0
      spine-csharp/src/AnimationState.cs
  2. 1 1
      spine-csharp/src/package.json

+ 8 - 0
spine-csharp/src/AnimationState.cs

@@ -1214,6 +1214,14 @@ namespace Spine {
 			get { return nextTrackLast != -1; }
 		}
 
+		/// <summary>Returns true if there is a <see cref="Next"/> track entry that will become the current track entry during the
+		/// next <see cref="AnimationState.Update(float)"/>.</summary>
+		public bool IsNextReady {
+			get {
+				return (next != null) && (nextTrackLast - next.delay >= 0);
+			}
+		}
+
 		/// <summary>
 		/// Returns true if at least one loop has been completed.</summary>
 		/// <seealso cref="TrackEntry.Complete"/>

+ 1 - 1
spine-csharp/src/package.json

@@ -2,7 +2,7 @@
 	"name": "com.esotericsoftware.spine.spine-csharp",
 	"displayName": "spine-csharp Runtime",
 	"description": "This plugin provides the spine-csharp core runtime.",
-	"version": "4.2.23",
+	"version": "4.2.24",
 	"unity": "2018.3",
 	"author": {
 		"name": "Esoteric Software",