12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace KairoEngine.Core
- {
- public class ActivityMessageEvents
- {
- #region SimpleMessage
- public static event System.Action<string> OnActivityMessage;
- public static void Send(string text)
- {
- if(OnActivityMessage != null)
- {
- OnActivityMessage(text);
- }
- }
- #endregion
- #region TimedMessage
- public static event System.Action<string, float> OnTimedActivityMessage;
- public static void Send(string text, float time)
- {
- if(OnTimedActivityMessage != null)
- {
- OnTimedActivityMessage(text, time);
- }
- }
- #endregion
- #region StickyMessage
- public static event System.Action<string, bool> OnStickyActivityMessage;
- public static void Send(string text, bool sticky)
- {
- if(OnStickyActivityMessage != null)
- {
- OnStickyActivityMessage(text, sticky);
- }
- }
- #endregion
- #region UpdateMessage
- public static event System.Action<string, string, float, bool> OnUpdateActivityMessage;
- public static void Update(string oldText, string newText, float time, bool sticky)
- {
- if(OnUpdateActivityMessage != null)
- {
- OnUpdateActivityMessage(oldText, newText, time, sticky);
- }
- }
- #endregion
- #region RemoveMessage
- public static event System.Action<string> OnRemoveActivityMessage;
- public static void Remove(string text)
- {
- if(OnRemoveActivityMessage != null)
- {
- OnRemoveActivityMessage(text);
- }
- }
- #endregion
- }
- }
|