public void Notify(string txt, SimulationEventNotificationPriority prio = SimulationEventNotificationPriority.Normal)
    {
        DateTime timestamp = GameTimeComponent.CurrentTime;
        SimulationEventNotification newNotification = new SimulationEventNotification(txt, prio, timestamp);

        NotificationReceived?.Invoke(newNotification);
    }
Ejemplo n.º 2
0
    private void OnNotificationReceived(SimulationEventNotification notification)
    {
        List <TMP_Dropdown.OptionData> dropdownOptions = new List <TMP_Dropdown.OptionData>();
        string option = string.Format("{0}.{1}.{2} {3}",
                                      notification.Timestamp.Day,
                                      notification.Timestamp.Month,
                                      notification.Timestamp.Year,
                                      notification.Text);

        dropdownOptions.Add(new TMP_Dropdown.OptionData(option));
        dropdownOptions.AddRange(DropdownNotificationList.options);
        DropdownNotificationList.options = dropdownOptions;
    }