public static void Add(NkmAnimation animation) { try { AnimationsToPlay.Enqueue(animation); } catch (Exception e) { Debug.LogError(e.Message); } }
/// <summary> /// Dequeues and plays every animation part from the queue, consecutively. /// </summary> private static async Task PlayNextAnimation() { _canPlayNext = false; NkmAnimation a = AnimationsToPlay.Dequeue(); #pragma warning disable 4014 if (a.AllowPlayingOtherAnimations) { a.Play(); } #pragma warning restore 4014 else { await a.Play(); } _canPlayNext = true; }
public static void Add(NkmAnimation animation) { AnimationsToPlay.Enqueue(animation); }