예제 #1
0
    /************************************************************************
    *	                Coroutine Declaration	                            *
    ************************************************************************/
    protected override IEnumerator CoroutineStart()
    {
        if (this._tween != null)
        {
            this._tween.Stop();
            this._tween = null;
        }
        this.target2D.transform.localPosition = this._position2D;
        this.target3D.transform.localPosition = this._position3D;
        yield return(new WaitForSeconds(0.5f));

        TweenUIData data = this.uiContainer.Data;

        if (this.container2D.activeSelf)
        {
            this._tween = XTween.To(this.target2D, XHash.New.AddX(800f).AddY(300f), data.time, data.Easing);
            this._tween.Play();
        }
        else
        {
            // this._tween = XTween.To(this.target3D, hash, data.time, data.Easing);
            // XObjectHash hash = XObjectHash.New.Add("fieldOfView", 6f);
            // this._tween = XTween.ValueTo<Camera>(this.camera3D,hash,data.time,data.Easing);
            // this._tween.OnComplete = Executor.New(() => this.StartCoroutine(this.Test()));
            // yield return this._tween.WaitForGotoAndPlay(0.2f);
            yield return(XTween.SerialTweens(false,
                                             this.target3D.To(XHash.New.Scale(300f, 100f, 400f), data.time),
                                             this.target3D.To(XHash.New.Position(200f, 50f, -1500f), data.time)).WaitForPlay());

            // this.target3D.transform.DOLocalMove(new Vector3(200f,50f,-1500f), data.time).Play();
            Debug.Log("Test");
        }
    }
예제 #2
0
    /************************************************************************
    *	                Coroutine Declaration	                            *
    ************************************************************************/
    protected override IEnumerator CoroutineStart()
    {
        if (this._tween != null)
        {
            this._tween.Stop();
        }
        this.target3D.transform.localPosition       = this._position3D;
        this.target3DSecond.transform.localPosition = this._position3DSecond;
        yield return(new WaitForSeconds(0.5f));

        TweenUIData data = this.uiContainer.Data;

        if (this._tween == null)
        {
            this._tween = XTween.SerialTweens
                          (
                false,
                target3DSecond.ToPosition3D(-940f, -160f, -500f, data.time, data.Easing),
                target3D.ToPosition3D(200f, 70f, -1500f, data.time, data.Easing)
                          ).SetLock().Play();
        }
        else
        {
            this._tween.Play(0f);
        }
    }
예제 #3
0
        private void PlayAnimation4(object sender, TappedRoutedEventArgs e)
        {
            Button bt = (Button)sender;

            bt.IsEnabled = false;

            double originX = targets_[3].X;
            double originY = targets_[3].Y;

            XTween.SerialTweens(
                XTween.ParallelTweens(
                    new XTween(targets_[3], null, 1, 5, 1, XTween.Easing.EaseBounceOut).SetProperties("ScaleX", "ScaleY"),
                    new XTween(targets_[3], "X", originX, cellWidth_ * 2, 2, XTween.Easing.EaseElasticOut),
                    new XTween(targets_[3], "Y", originY, winRect_.Height / 2 - 100, 2, XTween.Easing.EaseElasticOut)
                    ),
                XTween.ParallelTweens(
                    new XTween(targets_[3], null, 5, 1, 1, XTween.Easing.EaseBounceOut).SetProperties("ScaleX", "ScaleY"),
                    new XTween(targets_[3], "Rotate", 0, 180, 1, XTween.Easing.EaseElasticOut)
                    ).SetDelay(0.5),
                XTween.ParallelTweens(
                    new XTween(targets_[3], "X", originX, 1, XTween.Easing.EaseBackOut),
                    new XTween(targets_[3], "Y", originY, 1, XTween.Easing.EaseBackOut)
                    ).SetDelay(0.5)
                )
            .SetComplete((sender_, e_) => { bt.IsEnabled = true; })
            .Play();
        }
예제 #4
0
        private void PlayAnimation2(object sender, TappedRoutedEventArgs e)
        {
            Button bt = (Button)sender;

            bt.IsEnabled = false;

            var tween = XTween.SerialTweens(
                new XTween(Target2, "Width", 100, cellWidth_ - 20, 1, XTween.Easing.EaseElasticOut),
                new XTween(Target2, "Height", 100, cellWidth_ - 20, 1, XTween.Easing.EaseElasticOut),
                new XTween(Target2, "Width", cellWidth_ - 20, 100, 1, XTween.Easing.EaseBounceOut),
                new XTween(Target2, "Height", cellWidth_ - 20, 100, 1, XTween.Easing.EaseBounceOut)
                );

            tween.OnCompleted += (sender_, e_) =>
            {
                bt.IsEnabled = true;
            };
            tween.Play();
        }
예제 #5
0
    /************************************************************************
    *	                Coroutine Declaration	                            *
    ************************************************************************/
    protected override IEnumerator CoroutineStart()
    {
        if (this._tween != null)
        {
            this._tween.Stop();
            this._tween = null;
        }
        this.target3D.transform.localPosition       = this._position3D;
        this.target3DSecond.transform.localPosition = this._position3DSecond;
        yield return(new WaitForSeconds(0.5f));

        TweenUIData data = this.uiContainer.Data;

        this._tween = XTween.SerialTweens
                      (
            false,
            XTween.To(this.target3DSecond, XHash.New.AddX(-940f).AddY(-160f).AddZ(-500f), data.time, data.Easing),
            XTween.To(this.target3D, XHash.New.AddX(200f).AddY(70f).AddZ(-1500f), data.time, data.Easing)
                      );
        this._tween.Play();
    }