Esempio n. 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;
            }
        }
Esempio n. 2
0
 public int GetComponentIdx(int componentId)
 {
     return(_componentIndex.GetTypeIndex(componentId));
 }