예제 #1
0
 public static void RemoveManagedListener(IManagedUpdate behaviour)
 {
     AssertSingletonExists();
     Debug.Assert(behaviour != null,
                  "[ManagedBehaviourEngine] behaviour is null");
     updateListeners.Remove(behaviour);
 }
예제 #2
0
 public void UnregisterUpdate(IManagedUpdate managedUpdate)
 {
     if (updateList.Remove(managedUpdate))
     {
         isUpdateListChanged = true;
     }
 }
예제 #3
0
 /// <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;
 }
예제 #4
0
        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);
        }