Пример #1
0
        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;
            }
        }
Пример #2
0
 public bool HasComponentIndex(int componentId)
 {
     return(_componentIndex.HasIndex(componentId));
 }