Exemplo n.º 1
0
 protected void Add(Entity e)
 {
     System.Diagnostics.Debug.Assert(e != null);
     e.AddSystemBit(systemBit);
     if (e.Enabled == true)
     {
         Enable(e);
     }
     Added(e);
 }
        public void Change(Entity e)
        {
            bool contains = (systemBit & e.GetSystemBits()) == systemBit;
            bool interest = (typeFlags & e.GetTypeBits()) == typeFlags;

            if (interest && !contains && typeFlags > 0)
            {
                actives.Add(e.GetId(), e);
                e.AddSystemBit(systemBit);
                Added(e);
            }
            else if (!interest && contains && typeFlags > 0)
            {
                Remove(e);
            }
        }