示例#1
0
 public void RemoveComponent(Component c)
 {
     if (c.Entity.HasProperty<Int32>("Layer"))
     {
         if (m_Components.Contains(c as Selectable))
         {
             m_Components.Remove(c as Selectable);
         }
     }
     if (c == m_SelectionBox)
         m_SelectionBox = null;
 }
示例#2
0
 public void RegisterComponent(Component c)
 {
     if (c is Selectable)
     {
         m_Components.Add(c as Selectable);
     }
     else if (c is SelectionBox)
         m_SelectionBox = c as SelectionBox;
 }