Exemple #1
0
        private Task hide()
        {
            TweenTask task = new TweenTask(
                delegate {
                TweenGroupAlpha alpha = TweenGroupAlpha.Begin(this.gameObject, 0.15f, 0.0f);
                return(alpha);
            }
                );



            TaskManager.PushBack(task, delegate {
                if (_cg != null)
                {
                    _cg.alpha = 0.0f;
                }
                //Debug.LogError("????");
                //	if(_evtSys != null) _evtSys.enabled = true;
                if (this != null && this.gameObject != null)
                {
                    this.gameObject.SetActive(false);
                }
            });
            return(task);
        }
Exemple #2
0
        /// <summary>
        /// Start the tweening operation.
        /// </summary>

        static public TweenGroupAlpha Begin(GameObject go, float duration, float alpha)
        {
            TweenGroupAlpha comp = Tween.Begin <TweenGroupAlpha>(go, duration);

            comp.from = comp.alpha;
            comp.to   = alpha;

            if (duration <= 0f)
            {
                comp.Sample(1f, true);
                comp.enabled = false;
            }
            return(comp);
        }
Exemple #3
0
        private Task show()
        {
            TweenTask task = new TweenTask(
                delegate {
                this.gameObject.SetActive(true);
                TweenGroupAlpha alpha = TweenGroupAlpha.Begin(this.gameObject, 0.3f, 1.0f);
                return(alpha);
            }
                );

            TaskManager.PushBack(task, delegate {
                _cg.alpha = 1.0f;
            });
            return(task);
        }
Exemple #4
0
        private Task hide()
        {
            TweenTask task = new TweenTask
                             (
                delegate {
                TweenGroupAlpha alpha = TweenGroupAlpha.Begin(this.gameObject, 0.15f, 0.0f);
                return(alpha);
            }
                             );



            TaskManager.PushBack(task, delegate {
                if (_cg != null)
                {
                    _cg.alpha = 0.0f;
                }
                if (this != null && this.gameObject != null)
                {
                    this.gameObject.SetActive(false);
                }
            });
            return(task);
        }