Пример #1
0
        void OnStop()
        {
            enabledX = false;
            enabledY = false;

            // If we stopped an animation in the middle, we do not want to leave it like this
            if (PhaseX != 1.0f || PhaseY != 1.0f)
            {
                PhaseX = 1.0f;
                PhaseX = 1.0f;

                Delegate.AnimatorUpdated(this);
                UpdateBlock?.Invoke();
            }

            Delegate.AnimatorStopped(this);
            StopBlock?.Invoke();
        }
Пример #2
0
        public void Stop()
        {
            if (displayLink != null)
            {
                displayLink.RemoveFromRunLoop(Foundation.NSRunLoop.Main, Foundation.NSRunLoopMode.Common);
                displayLink = null;

                enabledX = false;
                enabledY = false;

                // If we stopped an animation in the middle, we do not want to leave it like this
                if (PhaseX != 1.0 || PhaseY != 1.0)
                {
                    PhaseX = 1.0f;
                    PhaseX = 1.0f;

                    Delegate.AnimatorUpdated(this);
                    UpdateBlock?.Invoke();
                }

                Delegate.AnimatorStopped(this);
                StopBlock?.Invoke();
            }
        }