当前位置: 首页>>代码示例>>C#>>正文


C# Tweener.SetDelay方法代码示例

本文整理汇总了C#中Tweener.SetDelay方法的典型用法代码示例。如果您正苦于以下问题:C# Tweener.SetDelay方法的具体用法?C# Tweener.SetDelay怎么用?C# Tweener.SetDelay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tweener的用法示例。


在下文中一共展示了Tweener.SetDelay方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Apply

        public override void Apply()
        {
            GearLookValue gv;
            bool ct = this.connected;
            if (ct)
            {
                if (!_storage.TryGetValue(_controller.selectedPageId, out gv))
                    gv = _default;
            }
            else
                gv = _default;

            if (_tweener != null)
                _tweener.Kill(true);

            if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect
                && ct && pageSet.ContainsId(_controller.previousPageId))
            {
                _owner._gearLocked = true;
                _owner.grayed = gv.grayed;
                _owner._gearLocked = false;

                bool a = gv.alpha != _owner.alpha;
                bool b = gv.rotation != _owner.rotation;
                if (a || b)
                {
                    _owner.internalVisible++;
                    _tweener = DOTween.To(() => new Vector2(_owner.alpha, _owner.rotation), val =>
                    {
                        _owner._gearLocked = true;
                        if (a)
                            _owner.alpha = val.x;
                        if (b)
                            _owner.rotation = val.y;
                        _owner._gearLocked = false;
                    }, new Vector2(gv.alpha, gv.rotation), tweenTime)
                    .SetEase(easeType)
                    .SetUpdate(true)
                    .OnComplete(() =>
                    {
                        _tweener = null;
                        _owner.internalVisible--;
                    });

                    if (delay > 0)
                        _tweener.SetDelay(delay);
                }
            }
            else
            {
                _owner._gearLocked = true;
                _owner.alpha = gv.alpha;
                _owner.rotation = gv.rotation;
                _owner.grayed = gv.grayed;
                _owner._gearLocked = false;
            }
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:57,代码来源:GearLook.cs

示例2: Apply

        public override void Apply()
        {
            GearSizeValue gv;
            bool ct = this.connected;
            if (ct)
            {
                if (!_storage.TryGetValue(_controller.selectedPageId, out gv))
                    gv = _default;
            }
            else
                gv = _default;

            if (_tweener != null)
                _tweener.Kill(true);

            if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect
                && ct && pageSet.ContainsId(_controller.previousPageId))
            {
                bool a = gv.width != _owner.width || gv.height != _owner.height;
                bool b = gv.scaleX != _owner.scaleX || gv.scaleY != _owner.scaleY;
                if (a || b)
                {
                    _owner.internalVisible++;
                    _tweener = DOTween.To(() => new Vector4(_owner.width, _owner.height, _owner.scaleX, _owner.scaleY), v =>
                    {
                        _owner._gearLocked = true;
                        if (a)
                            _owner.SetSize(v.x, v.y, _owner.gearXY.controller == _controller);
                        if (b)
                            _owner.SetScale(v.z, v.w);
                        _owner._gearLocked = false;
                    }, new Vector4(gv.width, gv.height, gv.scaleX, gv.scaleY), tweenTime)
                    .SetEase(easeType)
                    .SetUpdate(true)
                    .OnComplete(() =>
                    {
                        _tweener = null;
                        _owner.internalVisible--;
                        _owner.InvalidateBatchingState();
                    });

                    if (delay > 0)
                        _tweener.SetDelay(delay);
                }
            }
            else
            {
                _owner._gearLocked = true;
                _owner.SetSize(gv.width, gv.height, _owner.gearXY.controller == _controller);
                _owner.SetScale(gv.scaleX, gv.scaleY);
                _owner._gearLocked = false;
            }
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:53,代码来源:GearSize.cs

示例3: Apply

        public override void Apply()
        {
            GearXYValue gv;
            if (!_storage.TryGetValue(_controller.selectedPageId, out gv))
                gv = _default;

            if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect)
            {
                if(tweener!=null)
                {
                    if (_tweenTarget.x != gv.x || _tweenTarget.y != gv.y)
                    {
                        tweener.Kill(true);
                        tweener = null;
                    }
                    else
                        return;
                }

                if(_owner.x != gv.x || _owner.y != gv.y)
                {
                    _owner.internalVisible++;
                    _tweenTarget = gv;

                    tweener = DOTween.To(() => new Vector2(_owner.x, _owner.y), v =>
                    {
                        _owner._gearLocked = true;
                        _owner.SetXY(v.x, v.y);
                        _owner._gearLocked = false;
                    }, new Vector2(gv.x, gv.y), tweenTime)
                    .SetEase(easeType)
                    .SetUpdate(true)
                    .OnComplete(() =>
                    {
                        tweener = null;
                        _owner.internalVisible--;
                        _owner.InvalidateBatchingState();
                    });

                    if (delay > 0)
                        tweener.SetDelay(delay);
                }
            }
            else
            {
                _owner._gearLocked = true;
                _owner.SetXY(gv.x, gv.y);
                _owner._gearLocked = false;
            }
        }
开发者ID:kensong1194717296,项目名称:FairyGUI-unity,代码行数:50,代码来源:GearXY.cs

示例4: SetTweenerComplete

 private static void SetTweenerComplete(Tweener tweener, float delay = 0, System.Action doComplete = null)
 {
     if (delay > 0)
         tweener.SetDelay(delay);
     tweener.OnComplete(() =>
     {
         if (doComplete != null)
         {
             doComplete();
             doComplete = null;
         }
     });
 }
开发者ID:l980305284,项目名称:UGUIPlugin,代码行数:13,代码来源:DotweenUtlity.cs

示例5: Apply

        public override void Apply()
        {
            GearLookValue gv;
            if (!_storage.TryGetValue(_controller.selectedPageId, out gv))
                gv = _default;

            if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect)
            {
                _owner._gearLocked = true;
                _owner.grayed = gv.grayed;
                _owner._gearLocked = false;

                if (tweener != null)
                {
                    if (_tweenTarget.alpha != gv.alpha || _tweenTarget.rotation != gv.rotation)
                    {
                        tweener.Kill(true);
                        tweener = null;
                    }
                    else
                        return;
                }

                bool a = gv.alpha != _owner.alpha;
                bool b = gv.rotation != _owner.rotation;
                if (a || b)
                {
                    _owner.internalVisible++;
                    _tweenTarget = gv;

                    tweener = DOTween.To(() => new Vector2(_owner.alpha, _owner.rotation), val =>
                    {
                        _owner._gearLocked = true;
                        if (a)
                            _owner.alpha = val.x;
                        if (b)
                            _owner.rotation = val.y;
                        _owner._gearLocked = false;
                    }, new Vector2(gv.alpha, gv.rotation), tweenTime)
                    .SetEase(easeType)
                    .SetUpdate(true)
                    .OnUpdate(() =>
                    {
                        if(b)
                            _owner.InvalidateBatchingState();
                    })
                    .OnComplete(() =>
                    {
                        tweener = null;
                        _owner.internalVisible--;
                        if (b)
                            _owner.InvalidateBatchingState();
                        _owner.OnGearStop.Call(this);
                    });

                    if (delay > 0)
                        tweener.SetDelay(delay);
                }
            }
            else
            {
                _owner._gearLocked = true;
                _owner.alpha = gv.alpha;
                _owner.rotation = gv.rotation;
                _owner.grayed = gv.grayed;
                _owner._gearLocked = false;
            }
        }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:68,代码来源:GearLook.cs

示例6: Apply

        public override void Apply()
        {
            GearColorValue cv;
            if (!_storage.TryGetValue(_controller.selectedPageId, out cv))
                cv = _default;

            if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect)
            {
                if (tweener != null)
                {
                    if (_tweenTarget.color != cv.color)
                    {
                        tweener.Kill(true);
                        tweener = null;
                    }
                    else
                        return;
                }

                if (((IColorGear)_owner).color != cv.color)
                {
                    _owner.internalVisible++;
                    _tweenTarget = cv;

                    tweener = DOTween.To(() => ((IColorGear)_owner).color, v =>
                    {
                        _owner._gearLocked = true;
                        ((IColorGear)_owner).color = v;
                        _owner._gearLocked = false;
                    }, cv.color, tweenTime)
                    .SetEase(easeType)
                    .SetUpdate(true)
                    .OnUpdate(() =>
                    {
                        _owner.InvalidateBatchingState();
                    })
                    .OnComplete(() =>
                    {
                        tweener = null;
                        _owner.internalVisible--;
                        _owner.InvalidateBatchingState();
                        _owner.OnGearStop.Call(this);
                    });

                    if (delay > 0)
                        tweener.SetDelay(delay);
                }
            }
            else
            {
                _owner._gearLocked = true;
                ((IColorGear)_owner).color = cv.color;
                _owner._gearLocked = false;
            }
        }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:55,代码来源:GearColor.cs

示例7: SetDelay

 public static void SetDelay(Tweener tweener, float delay)
 {
     tweener.SetDelay(delay);
 }
开发者ID:kensong1194717296,项目名称:FairyGUI-unity,代码行数:4,代码来源:TweenUtils.cs


注:本文中的Tweener.SetDelay方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。