Пример #1
0
        private IEnumerator PopUpNotificationWindow()
        {
            ShowHideAnimations animations = new ShowHideAnimations(gameObjectToAnimate: notificationWindow,
                                                                   position_ON_Screen: position_ON_Screen,
                                                                   position_OUT_ofScreen: position_OUT_Screen,
                                                                   leap: leap);

            StartCoroutine(animations.ShowAnimation());
            yield return(new WaitForSeconds(timeOnScreen));

            StartCoroutine(animations.HideAnimation());
            yield return(new WaitUntil(() => !animations.sequence.active));

            Destroy(notificationWindow);
        }
Пример #2
0
        public void ShowOrHideUIComponent()
        {
            showHide_Animations = new ShowHideAnimations(gameObjectToAnimate: this.gameObject,
                                                         position_ON_Screen: position_ON_Screen,
                                                         position_OUT_ofScreen: position_OUT_ofScreen,
                                                         leap: leap);

            if (onScreen)
            {
                StartCoroutine(showHide_Animations.HideAnimation());
            }
            else
            {
                StartCoroutine(showHide_Animations.ShowAnimation());
            }

            onScreen = !onScreen;
        }