public void ShowAchievement(int achievementId)
        {
            //make sure the achievement we want to show has been defined in the Achievements list
            //the achievementId is actually the index of the achievement as it has been defined in the list
            if (Achievements == null || achievementId < 0 || achievementId > Achievements.Count - 1)
            {
                return;
            }

            //get the achievement from the list
            AchievementData achievement = Achievements[achievementId];

            //make sure we got an achievement and that the entry was not null
            if (achievement == null)
            {
                return;
            }

            //get a clone of the UIPopup, with the given PopupName, from the UIPopup Database
            m_popup = UIPopupManager.GetPopup(PopupName);

            //make sure that a popup clone was actually created
            if (m_popup == null)
            {
                return;
            }

            //set the achievement icon
            m_popup.Data.SetImagesSprites(achievement.Icon);
            //set the achievement title and message
            m_popup.Data.SetLabelsTexts(achievement.Achievement, achievement.Description);

            //show the popup
            UIPopupManager.ShowPopup(m_popup, m_popup.AddToPopupQueue, false);
        }
Example #2
0
        public void ShowAllClearBonusPopup(int score)
        {
            var popup = UIPopupManager.GetPopup("AllClearBonus");

            UIPopupManager.ShowPopup(popup, popup.AddToPopupQueue, false);

            _autoCreaterFSM.SendTrigger(ArborFSMTrigger.ItemCreaterMessage.ALL_CLEAR_STAGE_ITEMS_CREATE);
        }
Example #3
0
        private void AllClearBonus()
        {
            var popup = UIPopupManager.GetPopup("AllClearBonus");

            UIPopupManager.ShowPopup(popup, popup.AddToPopupQueue, false);

            _scoreModel.AddScore = 5000;

            _autoCreateState.SendTrigger(ItemCreaterMessage.ALL_CLEAR_STAGE_ITEMS_CREATE);
        }
Example #4
0
    public void showString(string text)
    {
        //get a clone of the UIPopup, with the given PopupName, from the UIPopup Database
        m_popup = UIPopupManager.GetPopup(PopupName);

        //make sure that a popup clone was actually created
        if (m_popup == null)
        {
            return;
        }

        //set the achievement icon
        //m_popup.Data.SetImagesSprites(achievement.Icon);
        //set the achievement title and message
        m_popup.Data.SetLabelsTexts("", text);

        //show the popup
        UIPopupManager.ShowPopup(m_popup, m_popup.AddToPopupQueue, false);
    }
Example #5
0
        private void TriggerNotification(Achievement achievement)
        {
            m_popup = UIPopupManager.GetPopup(PopupName);

            if (m_popup == null)
            {
                return;
            }

            var icon    = m_popup.Data.Images[0];
            var title   = m_popup.Data.Labels[0].GetComponent <TextMeshProUGUI>();
            var message = m_popup.Data.Labels[1].GetComponent <TextMeshProUGUI>();


            m_popup.Data.SetImagesSprites(achievement.icon);
            m_popup.Data.SetLabelsTexts(achievement.title, achievement.description);
            icon.color    = Color.white;
            title.color   = Color.white;
            message.color = Color.white;

            UIPopupManager.ShowPopup(m_popup, m_popup.AddToPopupQueue, false);
        }