Exemple #1
0
        void IEntityDatabaseCallback.OnComponentRemoved(ECSComponent component, Type componentType)
        {
            IEntityCollection entityCollection = component as IEntityCollection;

            if (entityCollection != null)
            {
                entityCollection.RemoveAll();
            }

            (_componentMap[componentType] as ComponentList).Remove(component);

            if (_componentMap[componentType].Count == 0)
            {
                _componentMap.Remove(componentType);
            }
        }