Example #1
0
        public static uTweenAlpha Begin(GameObject go, float duration, float delay, float from, float to)
        {
            uTweenAlpha comp = uTweener.Begin <uTweenAlpha> (go, duration);

            comp.from  = from;
            comp.to    = to;
            comp.delay = delay;

            if (duration <= 0)
            {
                comp.Sample(1, true);
                comp.enabled = false;
            }
            return(comp);
        }
Example #2
0
        public static uTweenAlpha Begin(GameObject go, float from, float to, float duration = 1f, float delay = 0f, bool includeChildren = false, System.Action <GameObject> finishHandler = null)
        {
            uTweenAlpha comp = Begin <uTweenAlpha>(go, duration, finishHandler);

            comp.includeChildren = includeChildren;
            comp.value           = from;
            comp.alpha           = from;
            comp.from            = from;
            comp.to       = to;
            comp.duration = duration;
            comp.delay    = delay;
            if (duration <= 0)
            {
                comp.Sample(1, true);
                comp.enabled = false;
            }
            return(comp);
        }