/// <summary> /// When creating an interface, register it with this function to receive notifications. /// Call Unregister() when destroying the interface again. /// </summary> /// <param name="Me">A reference to the UI that should receive pings.</param> public void Register(PingUI Me) { if (!Instance.uis.Contains(Me)) { Instance.uis.Add(Me); } }
/// <summary> /// When destroying an interface, unregister it first. /// </summary> /// <param name="Me">A reference to the UI that should receive pings.</param> public void Unregister(PingUI Me) { if (Instance.uis.Contains(Me)) { Instance.uis.Remove(Me); } }