public static void RemoveManagedListener(IManagedUpdate behaviour) { AssertSingletonExists(); Debug.Assert(behaviour != null, "[ManagedBehaviourEngine] behaviour is null"); updateListeners.Remove(behaviour); }
public void UnregisterUpdate(IManagedUpdate managedUpdate) { if (updateList.Remove(managedUpdate)) { isUpdateListChanged = true; } }
/// <summary> /// Registers a script with IManagedUpdate to have its ManagedUpdate() called by UpdateManager /// </summary> /// <param name="managedUpdate">Script that implements IManagedUpdate</param> public void RegisterUpdate(IManagedUpdate managedUpdate) { if (managedUpdate == null) { return; } updateList.Add(managedUpdate); isUpdateListChanged = true; }
public static void AddManagedListener(IManagedUpdate behaviour) { AssertSingletonExists(); Debug.Assert(!updateListeners.Contains(behaviour), "[ManagedBehaviourEngine] Duplicate behaviour being subscribed!" + " Check your subscription logic, fool!"); Debug.Assert(behaviour != null, "[ManagedBehaviourEngine] behaviour is null"); updateListeners.Add(behaviour); }