Пример #1
0
 private void RemoveOldComponents(Component[] components)
 {
     var toRemove = new List<Type>();
     foreach (var pair in Entity.Components)
     {
         if (!components.Contains(pair.Value))
             toRemove.Add(pair.Key);
     }
     foreach (var type in toRemove)
         Entity.Remove(type);
 }