Exemplo n.º 1
0
 public void StartScaleAnimation(float scale0, float scale1, float dur, float wait, Tween.TweenTypes tweenType = Tween.TweenTypes.easeInOutSine, System.Action cb = null)
 {
     //Debug.Break ();
     this.reset     = true;
     this.tweenType = tweenType;
     this.duration  = dur;
     this.scale0    = scale0;
     this.scale1    = scale1;
     this.tf1       = this.GetComponent <RectTransform> ();
     this.animType  = AnimationTypes.Scale;
     SetOrigin();
     this.enabled = true;
     StartCoroutine(StartAnimationImpl(wait, cb));
 }
Exemplo n.º 2
0
 public void StartAlphaAnimation(float v0, float v1, float _duration, float wait, Tween.TweenTypes _tweenType, System.Action cb = null)
 {
     this.reset     = true;
     this.tweenType = _tweenType;
     this.duration  = _duration;
     this.scale0    = v0;
     this.scale1    = v1;
     this.tf1       = this.GetComponent <RectTransform> ();
     this.tf1.gameObject.AddMissingComponent <CanvasGroup>().alpha = v0;
     this.animType = AnimationTypes.AlphaAnimation;
     SetOrigin();
     this.enabled = true;
     this.gameObject.SetActive(true);
     StartCoroutine(StartAnimationImpl(wait, cb));
 }
Exemplo n.º 3
0
 public void _StartAnimateValue(float v0, float v1, float dur, float wait, Tween.TweenTypes tweenType, System.Action onBegin, System.Action <float> onUpdate, System.Action onEnd)
 {
     this.reset     = true;
     this.tweenType = tweenType;
     this.duration  = dur;
     this.scale0    = v0;
     this.scale1    = v1;
     this.tf1       = this.GetComponent <RectTransform> ();
     this.animType  = AnimationTypes.AnimateValue;
     OnUpdateValue  = onUpdate;
     SetOrigin();
     this.enabled = true;
     onBegin();
     StartCoroutine(StartAnimationImpl(wait, onEnd));
 }
Exemplo n.º 4
0
 public void StartBezierAnimation(RectTransform target, RectTransform tf0, RectTransform tf1, float dur, System.Action cb = null, Tween.TweenTypes tweenType = Tween.TweenTypes.easeInOutSine)
 {
     this.reset     = true;
     this.tweenType = tweenType;
     this.duration  = dur;
     this.target    = target;
     this.tf0       = tf0;
     this.tf1       = tf1;
     finalPos       = tf1.position;
     SetOrigin();
     this.enabled  = true;
     this.animType = AnimationTypes.MoveBezier;
     //Debug.Break ();
     StartCoroutine(StartAnimationImpl(0f, cb));
 }
Exemplo n.º 5
0
        public static void startScaleAnimation(UnityEngine.UI.Graphic gfx, float scale0, float scale1, float dur, float wait, Tween.TweenTypes tweenTypes, System.Action cb = null)
        {
            var rt = gfx.gameObject.GetComponent <RectTransform> ();

            rt.gameObject.AddComponent <UITween> ().StartScaleAnimation(scale0, scale1, dur, wait, tweenTypes, cb);
        }
Exemplo n.º 6
0
 public static void startScaleAnimation(RectTransform rt, float scale0, float scale1, float dur, Tween.TweenTypes tweenTypes, System.Action cb = null)
 {
     rt.gameObject.AddComponent <UITween> ().StartScaleAnimation(scale0, scale1, dur, 0f, tweenTypes, cb);
 }
Exemplo n.º 7
0
 public static void StartAnimateValue(UnityEngine.UI.Graphic gfx, float v0, float v1, float dur, float wait, Tween.TweenTypes tweenType, System.Action onBegin, System.Action <float> onUpdate, System.Action onEnd)
 {
     gfx.gameObject.AddComponent <UITween> ()._StartAnimateValue(v0, v1, dur, wait, tweenType, onBegin, onUpdate, onEnd);
 }
Exemplo n.º 8
0
 public static void startAlphaAnimation(GameObject go, float v0, float v1, float dur, float wait, Tween.TweenTypes tweenTypes, System.Action cb = null)
 {
     go.AddComponent <UITween> ().StartAlphaAnimation(v0, v1, dur, wait, tweenTypes, cb);
 }
Exemplo n.º 9
0
 public static void startAlphaAnimation(UnityEngine.UI.Graphic gfx, float v0, float v1, float dur, float wait, Tween.TweenTypes tweenTypes, System.Action cb = null)
 {
     gfx.gameObject.AddComponent <UITween> ().StartAlphaAnimation(v0, v1, dur, wait, tweenTypes, cb);
 }
Exemplo n.º 10
0
 public static void startBezierAnimation(UnityEngine.UI.Graphic gfx, RectTransform target, RectTransform tf0, RectTransform tf1, float dur, System.Action cb = null, Tween.TweenTypes tweenType = Tween.TweenTypes.easeInOutSine)
 {
     gfx.gameObject.AddComponent <UITween> ().StartBezierAnimation(target, tf0, tf1, dur, cb, tweenType);
 }