Ejemplo n.º 1
0
        /// <summary>
        /// Removes replicable with all children, children of children, etc.
        /// </summary>
        public void RemoveHierarchy(IMyReplicable replicable)
        {
            var children = m_parentToChildren.GetValueOrDefault(replicable, m_empty);

            while (children.Count > 0)
            {
                var e = children.GetEnumerator();
                e.MoveNext();
                RemoveHierarchy(e.Current);
            }
            Remove(replicable);
        }
Ejemplo n.º 2
0
 public HashSetReader <IMyReplicable> GetChildren(IMyReplicable replicable)
 {
     return(m_parentToChildren.GetValueOrDefault(replicable, m_empty));
 }
 public static MyExternalReplicable FindByObject(object obj)
 {
     return(m_objectExternalReplicables.GetValueOrDefault(obj, null));
 }