Ejemplo n.º 1
0
        public static void Request(AnimationClass Anim, bool ReplaceIfExists = true)
        {
            //Debug.WriteLine("Запуск анимации: " + Anim.ID + "| TargetValue: " + Anim.TargetValue);
            Anim.Status = AnimationClass.AnimationStatus.Requested;

            AnimationClass dupAnim = GetDuplicate(Anim);

            if (dupAnim != null)
            {
                if (ReplaceIfExists == true)
                {
                    dupAnim.Status = AnimationClass.AnimationStatus.Completed;
                }
                else
                {
                    return;
                }
            }

            AnimationList.Add(Anim);
        }
Ejemplo n.º 2
0
 private static AnimationClass GetDuplicate(AnimationClass Anim) => AnimationList.Find(a => a.ID == Anim.ID);