示例#1
0
 public void Remove(int item)
 {
     //todo get rid of this linear search
     if (ContainedDynamicObjects.Remove(item))
     {
         if (DynamicCount == 0)
         {
             Partition.RemoveNode(activationID);
             activationID = -1;
         }
     }
 }
示例#2
0
 public void Remove(int item)
 {
     if (ContainedObjects.Remove(item))
     {
         if (Count == 0)
         {
             Partition.RemoveNode(activationID);
             activationID = -1;
         }
     }
 }
 public void Remove(int item)
 {
     //todo get rid of this linear search
     if (ContainedDynamicObjects.Remove(item))
     {
         if (DynamicCount == 0)
         {
             Partition.RemoveNode(activationID);
             activationID = -1;
         }
     }
     else
     {
         Debug.LogError("Item not removed");
     }
 }
示例#4
0
        /// <summary>
        /// Unsubscribe from a message distribution identified by messageName.
        /// </summary>
        /// <param name="messageName">Message name.</param>
        /// <param name="handler">Handler.</param>
        /// <typeparam name="T">The return type of the message distribution.</typeparam>
        public static bool Unsubscribe <T> (string messageName, Del <T> handler) where T : LSMessage
        {
            object o;

            if (events.TryGetValue(messageName, out o) == false)
            {
                return(false);
            }
            FastList <Del <T> > dels = o as FastList <Del <T> >;

            if (dels == null)
            {
                return(false);
            }
            dels.Remove(handler);
            return(true);
        }
 public void RemoveImmovable(int item)
 {
     if (ContainedImmovableObjects.Remove(item))
     {
     }
 }