Beispiel #1
0
    private IEnumerator DelaySetItemTweenIn()
    {
        yield return(new WaitForEndOfFrame());

        var popupItems = m_PopupItems.ToArray();
        int num        = Mathf.Min(popupItems.Length, 5);

        for (int i = 0; i < num; i++)
        {
            var popupItem = popupItems[i];
            var itemTween = GetItemTween(popupItem, i);
            mTweenGroup.AppendTween(itemTween);
        }
    }
Beispiel #2
0
        protected void configureTween()
        {
            if (this.group == null)
            {
                this.group = (TweenGroup)
                             new TweenGroup()
                             .OnStarted((x) => { onStarted(); })
                             .OnStopped((x) => { onStopped(); })
                             .OnPaused((x) => { onPaused(); })
                             .OnResumed((x) => { onResumed(); })
                             .OnLoopCompleted((x) => { onLoopCompleted(); })
                             .OnCompleted((x) => { onCompleted(); });
            }

            group
            .ClearTweens()
            .SetMode(this.groupMode)
            .SetDelay(this.startDelay)
            .SetLoopType(this.loopType)
            .SetLoopCount(this.loopCount);

            for (int i = 0; i < tweens.Count; i++)
            {
                var tween = tweens[i];
                if (tween != null)
                {
                    tween.AutoRun = false;
                    var baseTween = tween.BaseTween;

                    if (baseTween == null)
                    {
                        Debug.LogError("Base tween not set", tween);
                    }
                    else
                    {
                        group.AppendTween(baseTween);
                    }
                }
            }
        }
Beispiel #3
0
    private void InitCameraTween()
    {
        float duration = 0.5f;

        mMoveCamTweenPos = Tween <Vector3> .Obtain()
                           .SetDuration(duration)
                           .OnExecute(pos =>
        {
            MoveCamTs.position = pos;
        });

        mMoveCamTweenRot = Tween <Vector3> .Obtain()
                           .SetDuration(duration)
                           .OnExecute(forward =>
        {
            MoveCamTs.forward = forward;
        });

        mCameraTween = new TweenGroup();
        mCameraTween.SetMode(TweenGroupMode.Concurrent);
        mCameraTween.AppendTween(mMoveCamTweenPos, mMoveCamTweenRot);
    }