Пример #1
0
 void OnUpdateObjective(UnityActionUpdateObjective updateObjective)
 {
     if (!string.IsNullOrEmpty(updateObjective.notificationText))
     {
         CreateNotification(updateObjective.notificationText);
     }
 }
    void OnUpdateObjective(UnityActionUpdateObjective updateObjective)
    {
        if (m_ObjectivesDictionnary.TryGetValue(updateObjective.objective, out ObjectiveToast toast) && toast != null)
        //&& !string.IsNullOrEmpty(descriptionText))
        {
            // set the new updated description for the objective, and forces the content size fitter to be recalculated
            Canvas.ForceUpdateCanvases();
            if (!string.IsNullOrEmpty(updateObjective.descriptionText))
            {
                toast.descriptionTextContent.text = updateObjective.descriptionText;
            }

            if (!string.IsNullOrEmpty(updateObjective.counterText))
            {
                toast.counterTextContent.text = updateObjective.counterText;
            }

            if (toast.GetComponent <RectTransform>())
            {
                UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(toast.GetComponent <RectTransform>());
            }
        }
    }
Пример #3
0
 void OnUpdateObjective(UnityActionUpdateObjective updateObjective)
 {
 }