/// <summary>
        /// Method called to do the animation IN, ie. from "out of the screen" to "in the screen".
        /// We will anim from top and horizontally.
        /// </summary>
        public void DOAnimIN()
        {
            AnimVerySimpleShare(true);

            DesactivateUIFitter();

            OnUIAnimInStart.Invoke();

            bool animFromTopFinished      = false;
            bool animHorizontallyFinished = false;

            AnimateINFromTop(() => {
                animFromTopFinished = true;

                if (animFromTopFinished && animHorizontallyFinished)
                {
                    animFromTopFinished      = false;
                    animHorizontallyFinished = false;
                    OnUIAnimInEnd.Invoke();
                }
            });
            AnimateINHorizontaly(() => {
                animHorizontallyFinished = true;

                if (animFromTopFinished && animHorizontallyFinished)
                {
                    animFromTopFinished      = false;
                    animHorizontallyFinished = false;
                    OnUIAnimInEnd.Invoke();
                }
            });
        }
Example #2
0
        /// <summary>
        /// Method called to do the animation IN, ie. from "out of the screen" to "in the screen".
        /// We will anim from top and horizontally.
        /// </summary>
        public void DOAnimIN()
        {
            Debug.Log("ANIM IN");
            DesactivateUIFitter();

            OnUIAnimInStart.Invoke();

            bool animFromTopFinished      = false;
            bool animHorizontallyFinished = false;

            AnimateINFromTop(() => {
                animFromTopFinished = true;

                if (animFromTopFinished && animHorizontallyFinished)
                {
                    animFromTopFinished      = false;
                    animHorizontallyFinished = false;
                    OnUIAnimInEnd.Invoke();
                }
            });
            AnimateINHorizontaly(() => {
                animHorizontallyFinished = true;

                if (animFromTopFinished && animHorizontallyFinished)
                {
                    animFromTopFinished      = false;
                    animHorizontallyFinished = false;
                    OnUIAnimInEnd.Invoke();
                }
            });
        }