Ejemplo n.º 1
0
        /// <summary>
        /// Applied before TriggerStop runs.
        /// </summary>
        internal static bool Prefix(KBatchedAnimController __instance)
        {
            var anim = __instance.CurrentAnim;

            if (__instance.animQueue.Count > 0)
            {
                __instance.StartQueuedAnim();
            }
            else if (anim != null && __instance.mode == KAnim.PlayMode.Once)
            {
                __instance.currentFrame = anim.numFrames - 1;
                __instance.Stop();
                DeferAnimQueueTrigger.TriggerAndQueue(__instance, (int)GameHashes.
                                                      AnimQueueComplete, null);
            }
            return(false);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Destroys the singleton instance of this class.
 /// </summary>
 internal static void DestroyInstance()
 {
     Instance?.Dispose();
     Instance = null;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates the singleton instance of this class.
 /// </summary>
 internal static void CreateInstance()
 {
     DestroyInstance();
     Instance = new DeferAnimQueueTrigger();
 }