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


C# Sequence.Prepend方法代码示例

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


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

示例1: Start

    // Use this for initialization
    void Start()
    {
        seq = DOTween.Sequence();

        seq.Prepend(transform.DOLocalMove(new Vector3(0.0f,0.0f,8.0f),0.8f).SetEase(Ease.OutSine));        //中心点を経由
        seq.Join(transform.DOLocalRotate(Vector3.zero, 0.8f).SetEase(Ease.Linear));
        seq.Append(transform.DOLocalMove(new Vector3(10.0f, -24.0f,8.0f), 0.8f).SetEase(Ease.InSine));
        seq.Join(transform.DOLocalRotate(new Vector3(0.0f,0.0f,-179.0f), 0.8f).SetEase(Ease.Linear));
        //終了地点

        seq.Play();
    }
开发者ID:GotoK,项目名称:H401,代码行数:13,代码来源:AnimationByTween.cs

示例2: Start

    // Use this for initialization
    //開始時点ですべて設定する
    void Start()
    {
        //子テキストにアニメーション設定
        gameText = transform.FindChild("GameTextImage").GetComponent<Image>();
        startText = transform.FindChild("StartTextImage").GetComponent<Image>();

        sec = DOTween.Sequence();
        //所定の位置

        gameObject.transform.position = transform.parent.position;

        gameText.transform.localPosition = new Vector3(-outScreen + textWMargin, textHMargin, 0.0f);
        startText.transform.localPosition = new Vector3(-outScreen - textWMargin, -textHMargin, 0.0f);

        sec.Prepend(gameText.transform.DOLocalMoveX(-outScreen + textWMargin + 0.01f, 0.8f));
        //中心へ入ってくる

        sec.Append(gameText.transform.DOLocalMoveX(-textWMargin - textCenterWidth, tweenDuration / 4.0f));
        sec.Append(startText.transform.DOLocalMoveX(textWMargin - textCenterWidth, tweenDuration / 2.0f));

        //中心でちょっと待機する
        sec.Join(gameText.transform.DOLocalMoveX(-textWMargin + textCenterWidth, tweenDuration / 2.0f));
        sec.Append(startText.transform.DOLocalMoveX(textWMargin + textCenterWidth, tweenDuration / 4.0f));

        //画面外へ移動する
        sec.Join(gameText.transform.DOLocalMoveX(outScreen + textWMargin, tweenDuration / 4.0f));
        sec.Append(startText.transform.DOLocalMoveX(outScreen - textWMargin, tweenDuration / 4.0f)
            .OnComplete( () => {
                GameScene gameScene = transform.root.gameObject.GetComponent<AppliController>().GetCurrentScene().GetComponent<GameScene>();
                gameScene.gameController.nodeController.SetSlideAll(false); //ノードを操作可能状態に
                gameScene.gameUI.gameInfoCanvas.limitTime.eventRatio = 1.0f;    //時間が減るように
                Destroy(this.gameObject);
            }));

        sec.Play();
        /*        gameObject.transform.position = new Vector3( 0.0f,150.0f -textHMargin,0.0f);
                Vector3 vPos = new Vector3(-outScreen - textWMargin, -textHMargin, 0.0f);
                gameText.transform.DOLocalMoveX(-outScreen - textWMargin,tweenDuration / 4.0f).OnComplete(() =>
                {
                gameText.transform.localPosition = vPos;
                gameText.transform.DOLocalMoveX( - textWMargin - textCenterWidth, tweenDuration / 4.0f).SetEase(Ease.OutQuad)
                    .OnComplete(() => {
                        gameText.transform.DOLocalMoveX(-textWMargin + textCenterWidth, tweenDuration / 2.0f).SetEase(Ease.Linear)
                            .OnComplete(() =>
                            {
                                gameText.transform.DOLocalMoveX(outScreen - textWMargin, tweenDuration / 4.0f).SetEase(Ease.OutQuad)
                                    .OnComplete(() => {
                                        GameScene gameScene = transform.root.gameObject.GetComponent<AppliController>().GetCurrentScene().GetComponent<GameScene>();
                                        gameScene.gameController.nodeController.SetSlideAll(false); //ノードを操作可能状態に
                                        gameScene.gameUI.gameInfoCanvas.limitTime.eventRatio = 1.0f;    //時間が減るように
                                        Destroy(this.gameObject);
                                    });
                            });
                    });
                });
                vPos = new Vector3(-outScreen + textWMargin, +textHMargin, 0.0f);
                startText.transform.position = new Vector3(0.0f,150.0f + textHMargin,0.0f);
                startText.transform.localPosition = vPos;

                startText.transform.DOLocalMoveX(+textWMargin - textCenterWidth, tweenDuration / 4.0f).SetEase(Ease.OutQuad)
                    .OnComplete(() =>
                    {
                        startText.transform.DOLocalMoveX(textWMargin + textCenterWidth, tweenDuration / 2.0f).SetEase(Ease.Linear)
                            .OnComplete(() =>
                            {
                                startText.transform.DOLocalMoveX(outScreen + textWMargin, tweenDuration / 4.0f).SetEase(Ease.OutQuad);
                            });
                    });
        */
    }
开发者ID:GotoK,项目名称:H401,代码行数:72,代码来源:GameStartPanel.cs


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