FairyGUI.Transition._Play C# (CSharp) Method

_Play() public method

public _Play ( int times, float delay, PlayCompleteCallback onComplete, bool reverse ) : void
times int
delay float
onComplete PlayCompleteCallback
reverse bool
return void
        void _Play(int times, float delay, PlayCompleteCallback onComplete, bool reverse)
        {
            Stop(true, true);

            if (times == 0)
                times = 1;
            else if (times == -1)
                times = int.MaxValue;
            _totalTimes = times;
            _reversed = reverse;

            InternalPlay(delay);
            _playing = _totalTasks > 0;
            if (_playing)
            {
                _onComplete = onComplete;

                _owner.internalVisible++;
                if ((_options & OPTION_IGNORE_DISPLAY_CONTROLLER) != 0)
                {
                    int cnt = _items.Count;
                    for (int i = 0; i < cnt; i++)
                    {
                        TransitionItem item = _items[i];
                        if (item.target != null && item.target != _owner)
                            item.target.internalVisible++;
                    }
                }
            }
            else if (onComplete != null)
                onComplete();
        }