public bool UnregisterGlobalChangedListener(ChangedCallback callback, object userData) { ChangedListener item = new ChangedListener(); item.SetCallback(callback); item.SetUserData(userData); return(this.m_globalChangedListeners.Remove(item)); }
public GameModeSetting RemoveChangedCallback(ChangedCallback callback) { if (onStateChanged == null) { return(this); } onStateChanged -= callback; return(this); }
public GameModeSetting AddChangedCallback(ChangedCallback callback) { if (onStateChanged == null) { onStateChanged = callback; return(this); } onStateChanged += callback; return(this); }
public bool RegisterGlobalChangedListener(ChangedCallback callback, object userData) { ChangedListener item = new ChangedListener(); item.SetCallback(callback); item.SetUserData(userData); if (this.m_globalChangedListeners.Contains(item)) { return(false); } this.m_globalChangedListeners.Add(item); return(true); }
public bool RegisterChangedListener(Option option, ChangedCallback callback, object userData) { List <ChangedListener> list; ChangedListener item = new ChangedListener(); item.SetCallback(callback); item.SetUserData(userData); if (!this.m_changedListeners.TryGetValue(option, out list)) { list = new List <ChangedListener>(); this.m_changedListeners.Add(option, list); } else if (list.Contains(item)) { return(false); } list.Add(item); return(true); }
public bool UnregisterChangedListener(Option option, ChangedCallback callback, object userData) { List <ChangedListener> list; ChangedListener item = new ChangedListener(); item.SetCallback(callback); item.SetUserData(userData); if (!this.m_changedListeners.TryGetValue(option, out list)) { return(false); } if (!list.Remove(item)) { return(false); } if (list.Count == 0) { this.m_changedListeners.Remove(option); } return(true); }
public bool RegisterGlobalChangedListener(ChangedCallback callback) { return(this.RegisterGlobalChangedListener(callback, null)); }
public bool RegisterChangedListener(Option option, ChangedCallback callback) { return(this.RegisterChangedListener(option, callback, null)); }
internal static extern BadgeError SetChangedCallback(ChangedCallback callback, IntPtr userData);
internal static extern BadgeError UnsetChangedCallback(ChangedCallback callback);
public bool RemoveChangedListener(ChangedCallback callback) { return(this.RemoveChangedListener(callback, null)); }
public bool AddChangedListener(ChangedCallback callback) { return(this.AddChangedListener(callback, null)); }
internal static extern ErrorCode UnsetChangedCallback(ChangedCallback callback);
internal static extern ErrorCode SetChangedCallback(ChangedCallback callback, IntPtr userData);
internal static extern int SetChangedCb(string key, ChangedCallback callback, IntPtr userData);