コード例 #1
0
 public void SetNotification(string message, NotificationLifeTimeType notificationLifeTime, NotificationType notificationType)
 {
     _textMessage.text             = message;
     _imageNotificationColor.color = GetNotificationColor(notificationType);
     StopAllCoroutines();
     StartCoroutine(HideNotification(GetNotificationLifeTime(notificationLifeTime)));
 }
コード例 #2
0
        private float GetNotificationLifeTime(NotificationLifeTimeType type)
        {
            switch (type)
            {
            case NotificationLifeTimeType.Long:
                return(_long);

            case NotificationLifeTimeType.Medium:
                return(_medium);

            case NotificationLifeTimeType.Short:
                return(_short);
            }
            Debug.LogError("Unknow notificationLifeTime!");
            Debug.Break();
            return(10);
        }