Beispiel #1
0
        public static void Release(ProcessTween tween)
        {
#if UNITY_EDITOR
            if (!Application.isPlaying)
            {
                return;
            }
#endif
            instance.m_ActiveTweens.Remove(tween);

            if (tween.GetType() == typeof(ProcessTweenFloat))
            {
                instance.m_TweenFloatQueue.tweens.Enqueue((ProcessTweenFloat)tween);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Остановить твин
        /// </summary>
        /// <param name="id"></param>
        /// <param name="callCallback"></param>
        public static void StopTween(int id, bool callCallback = false)
        {
#if UNITY_EDITOR
            if (!Application.isPlaying)
            {
                return;
            }
#endif
            for (int i = 0; i < instance.m_ActiveTweens.Count; i++)
            {
                ProcessTween tween = instance.m_ActiveTweens[i];

                if (tween.tweenId == id)
                {
                    tween.StopTween(callCallback);
                }
            }
        }