コード例 #1
0
        /// <summary>Restarts the tween from the beginning</summary>
        /// <param name="includeDelay">If TRUE includes the eventual tween delay, otherwise skips it</param>
        public static void Restart(this Tween t, bool includeDelay = true)
        {
            if (t == null)
            {
                if (Debugger.logPriority > 1)
                {
                    Debugger.LogNullTween(t);
                }
                return;
            }
            else if (!t.active)
            {
                if (Debugger.logPriority > 1)
                {
                    Debugger.LogInvalidTween(t);
                }
                return;
            }
            else if (t.isSequenced)
            {
                if (Debugger.logPriority > 1)
                {
                    Debugger.LogInvalidTween(t);
                }
                return;
            }

            TweenManager.Restart(t, includeDelay);
        }