HOT() public static méthode

Shorthand for the U9HOTweenTransition. Uses the default constructor. For more control, use the other overloads directly.
public static HOT ( U9HOTweenTransition, hoTweenMethod, object target, float duration, Holoville parms ) : U9HOTweenTransition,
hoTweenMethod U9HOTweenTransition, /// HOTween method. ///
target object /// Target. ///
duration float /// Duration. ///
parms Holoville /// Parameters. ///
Résultat U9HOTweenTransition,
Exemple #1
0
    /// <summary>
    /// Creates a transition which disappears the block and spawns a score label in its place, which will itself disappear after some time.
    /// </summary>
    /// <returns>The disappear transition.</returns>
    /// <param name="score">Score.</param>
    public U9Transition CreateDisappearTransition(int score)
    {
        U9Transition scorePopupTransition = null;

        //U9Transition blockDisappearTransition = U9T.HOT (iTween.ScaleTo, squareSprite.gameObject, iTween.Hash ("scale", Vector3.zero, "time", 0.25f, "easetype", iTween.EaseType.easeInOutQuad ));

        //U9Transition bDT = U9T.HOT (HOTween.To, Scaling, 0.25f, new TweenParms().Prop("localScale", Vector3.zero, false).Ease(EaseType.EaseInOutQuad));
        U9Transition bDLT = U9T.LT(LeanTween.scale, squareGO, Vector3.zero, 0.25f, iTween.Hash("ease", LeanTweenType.easeInOutQuad));

        if (score > 0)
        {
            /*GameObject popupScoreInstance = (GameObject)Instantiate(scorePrefab[score-3], transform.position, Quaternion.identity);
             * popupScoreInstance.transform.parent = transform;
             * popupScoreInstance.transform.localScale = new Vector3(0.2f, 0.2f, 0.2f);
             *
             * int materialIn = 5*(score-3);
             * for(int i = materialIn; i < 5 + materialIn; i++)
             * {
             *      if(scoreMaterial[i].color == color)
             *      {
             *              Color newColor = new Color(scoreMaterial[i].color.r, scoreMaterial[i].color.g, scoreMaterial[i].color.b, 0);
             *              popupScoreInstance.renderer.material.color = newColor;
             *              break;
             *      }
             * }
             *
             * U9Transition ScaleIn = U9T.LT (LeanTween.scale, popupScoreInstance, new Vector3(53f, 53f, 53f), 1f, iTween.Hash("ease", LeanTweenType.linear));
             * U9Transition FadeIn = U9T.HOT (HOTween.To, popupScoreInstance.renderer.material, 0.35f, new TweenParms().Prop("color", new Color(color.r, color.g, color.b, 1), false).Ease(EaseType.EaseInOutQuad));
             * U9Transition FadeOut = U9T.HOT (HOTween.To, popupScoreInstance.renderer.material, 0.55f, new TweenParms().Prop("color", new Color(color.r, color.g, color.b, 0), false).Ease(EaseType.EaseInOutQuad).Delay(0.65f));
             *
             * ScaleIn.Begin();
             * FadeIn.Begin();
             * FadeOut.Begin();*/


            PopupScoreLabel popupScoreLabelInstance = (PopupScoreLabel)Instantiate(popupScoreLabelPrefab, transform.position, Quaternion.identity);

            popupScoreLabelInstance.transform.parent     = transform;
            popupScoreLabelInstance.transform.localScale = new Vector3(0.2f, 0.2f, 0.2f);
            popupScoreLabelInstance.Score = score;
            Color c = new Color(color.r, color.g, color.b, 0);
            popupScoreLabelInstance.Color = c;

            U9Transition ScaleIn = U9T.LT(LeanTween.scale, popupScoreLabelInstance.gameObject, new Vector3(0.6f, 0.6f, 0.6f), 1f, iTween.Hash("ease", LeanTweenType.linear));
            U9Transition FadeIn  = U9T.HOT(HOTween.To, popupScoreLabelInstance.GetComponent <UILabel>(), 0.35f, new TweenParms().Prop("color", new Color(color.r, color.g, color.b, 1), false).Ease(EaseType.EaseInOutQuad));
            U9Transition FadeOut = U9T.HOT(HOTween.To, popupScoreLabelInstance.GetComponent <UILabel>(), 0.55f, new TweenParms().Prop("color", new Color(color.r, color.g, color.b, 0), false).Ease(EaseType.EaseInOutQuad).Delay(0.65f));

            ScaleIn.Begin();
            FadeIn.Begin();
            FadeOut.Begin();
            //U9Transition FadeIn  = U9T.LT (LeanTween.alpha, popupScoreLabelInstance, 1.0f, 0.35f, iTween.Hash("ease", LeanTweenType.easeInCubic));

            Destroy(popupScoreLabelInstance, 5.0f);
        }

        bDLT.Ended += (transition) =>
        {
            Destroy(gameObject, 4.0f);
        };

        return(new InstantTransition(U9T.S(bDLT)));
    }