Пример #1
0
        internal BaseEvaluationPopupInterface SetInterface(BaseEvaluationPopupInterface popupInterface, Canvas canvas, string extension = "")
        {
            if (!popupInterface)
            {
                return(null);
            }
            var inScenePopUp = popupInterface.gameObject.scene == SceneManager.GetActiveScene() || popupInterface.gameObject.scene.name == "DontDestroyOnLoad";

            if (!inScenePopUp)
            {
                var newPopUp = Instantiate(popupInterface, canvas.transform, false);
                newPopUp.name  = popupInterface.name + extension;
                popupInterface = newPopUp;
            }
            return(popupInterface);
        }
Пример #2
0
        internal override void CreateInterface(Canvas canvas)
        {
            base.CreateInterface(canvas);
            _landscapeAchievementPopup = SetInterface(_landscapeAchievementPopup, canvas);
            _landscapeAchievementPopup?.gameObject.SetActive(true);

            _portraitAchievementPopup = SetInterface(_portraitAchievementPopup, canvas);
            _portraitAchievementPopup?.gameObject.SetActive(true);

            if (_landscapeAchievementPopup || _portraitAchievementPopup)
            {
                SUGARManager.client.Achievement.EnableNotifications(true);
                SUGARManager.client.Skill.EnableNotifications(true);
                InvokeRepeating("NotificatonCheck", _notificationCheckRate, _notificationCheckRate);
            }
        }