W() public static method

Shorthand for the U9WaitTransition. Uses the default constructor. For more control, use the other overloads directly.
public static W ( float waitSeconds ) : U9WaitTransition,
waitSeconds float /// Wait seconds. ///
return U9WaitTransition,
コード例 #1
0
    private void MoveIntro(Edge edge)
    {
        Vector3 MoveTo = new Vector3(0, 0, 0);

        switch (edge)
        {
        case Edge.Bottom:
            MoveTo = new Vector3(0, 800, 0);
            break;

        case Edge.Left:
            MoveTo = new Vector3(800, _IntroLogo.transform.position.y, 0);
            break;

        case Edge.Right:
            MoveTo = new Vector3(-800, _IntroLogo.transform.position.y, 0);
            break;

        case Edge.Top:
            MoveTo = new Vector3(0, -800, 0);
            break;
        }

        //U9Transition transitions = U9T.HOT(HOTween.To, _IntroLogo.transform, 0.2f, new TweenParms().Prop("localPosition", MoveTo, false).Ease(EaseType.EaseOutQuad));

        U9Transition transitions = U9T.LT(LeanTween.moveLocal, _IntroLogo, MoveTo, 0.2f, iTween.Hash("ease", LeanTweenType.easeOutQuad));


        transitions.Ended += (transition) =>
        {
            Destroy(_IntroLogo);
        };
        U9T.S(U9T.W(0.2f), transitions).Begin();
    }
コード例 #2
0
ファイル: U9T.cs プロジェクト: bigstupidx/swip3
    /// <summary>
    /// Plays transitions in parallel, with a specified interval between each one.
    /// </summary>
    /// <param name='staggerOffset'>
    /// Start time offset.
    /// </param>
    /// <param name='ignoreTimescale'>
    /// Set to true to ignore timescale settings.
    /// </param>
    /// <param name='transitions'>
    /// Transitions to stagger.
    /// </param>
    public static U9ParallelTransition Stagger(float staggerOffset, bool ignoreTimescale, params U9Transition[] transitions)
    {
        U9ParallelTransition stagger = new U9ParallelTransition();

        float currentOffset = 0f;

        foreach (U9Transition t in transitions)
        {
            if (t && !t.IsNull)
            {
                stagger.AddTransition(U9T.S(U9T.W(currentOffset, ignoreTimescale), t));
                currentOffset += staggerOffset;
            }
        }

        return(stagger);
    }