Exemple #1
0
    private void HideViewMask()
    {
        iTweenParams p = new iTweenParams();

        p.time   = tweenTime;
        p.scale  = Vector3.zero;
        p.easing = iTween.EaseType.linear;
        iTween.ScaleTo(viewMask, p.ToHash());
    }
Exemple #2
0
    public void PlayHideButton()
    {
        iTweenParams p = new iTweenParams();

        p.time           = 0.35f;
        p.from           = 1f;
        p.to             = 0.55f;
        p.onUpdate       = "OnSpriteFadeOutUpdate";
        p.onUpdateTarget = gameObject;

        iTween.ValueTo(gameObject, p.ToHash());
    }
    public void AnimateToZero(float time)
    {
        iTweenParams p = new iTweenParams();

        p.from             = (float)points;
        p.to               = 0f;
        p.easing           = iTween.EaseType.linear;
        p.time             = time;
        p.onUpdate         = "OnTweenUpdate";
        p.onUpdateTarget   = gameObject;
        p.onComplete       = "OnComplete";
        p.onCompleteTarget = gameObject;
        iTween.ValueTo(gameObject, p.ToHash());
    }
Exemple #4
0
 public void SlideToLeft()
 {
     if (!inTween)
     {
         iTweenParams p = new iTweenParams();
         p.speed            = slideSpeed;
         p.easing           = iTween.EaseType.linear;
         p.amount           = new Vector3(-screenWorldSize.x, 0f, 0f);
         p.onComplete       = "OnTweenComplete";
         p.onCompleteTarget = gameObject;
         iTween.MoveBy(viewsHolder.gameObject, p.ToHash());
         inTween = true;
     }
 }
Exemple #5
0
    private void DoTween(float fromExp, float toExp)
    {
        iTweenParams p = new iTweenParams();

        p.from             = fromExp;
        p.to               = toExp;
        p.time             = tweenTime;
        p.name             = "ExpTween";
        p.easing           = iTween.EaseType.linear;
        p.onUpdate         = "OnTweenUpdate";
        p.onUpdateTarget   = gameObject;
        p.onComplete       = "OnTweenFinished";
        p.onCompleteTarget = gameObject;
        iTween.ValueTo(gameObject, p.ToHash());
    }
Exemple #6
0
    public void FadeOut(tk2dSprite _sprite, float time)
    {
        sprite          = _sprite;
        origSpriteColor = sprite.color;

        iTweenParams p = new iTweenParams();

        p.time           = time;
        p.from           = 1f;
        p.to             = 0f;
        p.onUpdate       = "OnSpriteFadeOutUpdate";
        p.onUpdateTarget = gameObject;
        if (onCompleteMessage != "")
        {
            p.onComplete       = onCompleteMessage;
            p.onCompleteTarget = gameObject;
        }

        iTween.ValueTo(gameObject, p.ToHash());
    }