public void Add(IComponent component, ReactorConnection connection) { if (!_index.HasIndex(component.TypeId)) { _index.AddToIndex(component.Type); _index.Build(); } var idx = _index.GetTypeIndex(component.TypeId); if (idx >= _connections.Length) { Array.Resize(ref _connections, idx + 1); } if (_connections[idx] == null) { _connections[idx] = connection; } }
public bool HasComponentIndex(int componentId) { return(_componentIndex.HasIndex(componentId)); }