示例#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);
            }
        }
示例#2
0
 public abstract void Remove(ECSComponent component);