Exemplo n.º 1
0
        internal override bool Update()
        {
            lock (Locker)
            {
                var delta = (float)GetDelta();

                TargetProperty.Set(TargetElement, Mathf.Lerp(_from, _to, delta));

                return(delta < 1);
            }
        }
Exemplo n.º 2
0
        internal override bool Update()
        {
            lock (Locker)
            {
                var delta = (float)GetDelta();

                var scaleX = Mathf.Lerp(_from.Scale.x, _to.Scale.x, delta);
                var scaleY = Mathf.Lerp(_from.Scale.y, _to.Scale.y, delta);
                var absX   = Mathf.Lerp(_from.Absolute.x, _to.Absolute.x, delta);
                var absY   = Mathf.Lerp(_from.Absolute.y, _to.Absolute.y, delta);

                TargetProperty.Set(TargetElement, new UDim2(scaleX, absX, scaleY, absY));

                return(delta < 1);
            }
        }