123456789101112131415161718 |
- using UnityEngine;
- public class TextNotificationCenter : MonoBehaviour
- {
- [SerializeField]
- private TextNotification textNotificationPrefab;
- private TextNotification currentNotification;
- public void ShowNotification(string message)
- {
- if(currentNotification != null)
- currentNotification.CloseNotification();
- currentNotification = Instantiate(textNotificationPrefab, transform);
- currentNotification.Setup(message);
- }
- }
|