Exemplo n.º 1
0
        private void OnClickMask()
        {
            ITweenChain tween = TweenAllocate.Sequence();

            tween.Append(_animRectTrans.TweenAnchoredPositionTo(0.5f, new Vector2(800, 0)).SetLerp(LerpBezierFun));
            tween.Append(_animRectTrans.transform.TweenScaleTo(0.5f, Vector3.zero).SetEase(TweenEase.Bounce.EaseOut));
            tween.Execute(() => { UITools.CloseWindow <UIMap>(); });
            this.Go.PlayTween(tween);
        }
Exemplo n.º 2
0
        public override void OnRefresh()
        {
            // 窗口打开动画
            if (_isPlayOpenAnimation == false)
            {
                _isPlayOpenAnimation = true;
                ITweenNode tween = TweenAllocate.Parallel
                                   (
                    _animRectTrans.transform.TweenScaleTo(0.8f, Vector3.one).SetEase(TweenEase.Bounce.EaseOut),
                    _animRectTrans.transform.TweenAnglesTo(0.4f, new Vector3(0, 0, 720))
                                   );
                this.Go.PlayTween(tween);
            }

            // 闪烁动画
            var blinkTween = _animImg.TweenColor(0.5f, Color.green, Color.red).SetLoop(ETweenLoop.PingPong);

            this.Go.PlayTween(blinkTween);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 持续计时节点
 /// </summary>
 public static ITweenChain Duration(this ITweenChain chain, float delay, float duration, System.Action triggerCallback = null)
 {
     return(chain.Append(TweenAllocate.Duration(delay, duration, triggerCallback)));
 }
Exemplo n.º 4
0
 /// <summary>
 /// 重复计时节点
 /// </summary>
 public static ITweenChain Repeat(this ITweenChain chain, float delay, float interval, long maxTriggerCount, System.Action triggerCallback = null)
 {
     return(chain.Append(TweenAllocate.Repeat(delay, interval, maxTriggerCount, triggerCallback)));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 执行节点
 /// </summary>
 public static ITweenChain Execute(this ITweenChain chain, System.Action execute)
 {
     return(chain.Append(TweenAllocate.Execute(execute)));
 }
Exemplo n.º 6
0
 /// <summary>
 /// 条件等待节点
 /// </summary>
 public static ITweenChain Until(this ITweenChain chain, System.Func <bool> condition)
 {
     return(chain.Append(TweenAllocate.Until(condition)));
 }