/// <summary> /// Reorders components to match the local component type codes. /// </summary> public void LocalizeTypeCodes() { var oldComponents = Components.Where(i => i != null).ToList(); Components.Clear(); foreach (var component in oldComponents) { var typeCode = ComponentTypeCode.Get(component.GetType()); Components[typeCode.TypeCode] = component; } }
public Component[] GetComponents() => Entity.GetComponents().Where(i => ComponentFilter[ComponentTypeCode.Get(i.GetType())]).ToArray();