public void TryNextNotification() { if (!NotificationQueueData.IsEmpty()) { // Block all UI clicks fadeDemux.Show(); isNotificationActive = true; Hashtable entry = NotificationQueueData.PopNotification(); StartCoroutine(ShowPopup( (string)entry[NotificationPopupData.PrefabName], (string)entry[NotificationPopupData.Title], (string)entry[NotificationPopupData.Message], (PopupController.Callback)entry[NotificationPopupData.SpecialButtonCallback] )); } else { isNotificationActive = false; // Release block on UI clicks fadeDemux.Hide(); } }
/// <summary> /// Adds new notification to queue. /// </summary> /// <param name="notificationEntry">Notification entry.</param> public void AddToQueue(Hashtable notificationEntry) { NotificationQueueData.AddNotification(notificationEntry); if (!isNotificationActive) { TryNextNotification(); } }
void OnGUI() { if (Application.isPlaying) { if (SceneManager.GetActiveScene().name == SceneUtils.BEDROOM || SceneManager.GetActiveScene().name == SceneUtils.YARD) { GUILayout.Label("ClickManager Properties", EditorStyles.boldLabel); EditorGUILayout.TextField("Stack Size", ClickManager.Instance.StackModes.Count.ToString()); EditorGUILayout.TextField("Current Mode", ClickManager.Instance.CurrentMode.ToString()); GUILayout.Label("Notification Properties", EditorStyles.boldLabel); EditorGUILayout.TextField("Queue Size", NotificationQueueData.QueueCount().ToString()); GUILayout.Label("Pet Information", EditorStyles.boldLabel); EditorGUILayout.Toggle("Can blow fire", DataManager.Instance.GameData.PetInfo.CanBreathFire()); } // Add any other things that you want to see here } }