Nez.Portable/ECS/InternalUtils/EntityList.cs
/// <summary>
/// removes all entities from the entities list and passes them back to the entity cache
/// </summary>
removes all entities from the entities list and passes them back to the entity cache
removes all entities from the entities list and passes them back to the entity cache
public void removeAllEntities()
        {
            _unsortedTags.Clear();
            _entitiesToAdd.Clear();
            _isEntityListUnsorted = false;
            updateLists();
            for (var i = 0; i < _entities.length; i++)
            {
                _entities.buffer[i]._isDestroyed = true;
                _entities.buffer[i].onRemovedFromScene();
                _entities.buffer[i].scene = null;
            }
            _entities.clear();
            _entityDict.Clear();
        }
public void removeAllEntities ( ) { _unsortedTags . Clear ( ) ; _entitiesToAdd . Clear ( ) ; _isEntityListUnsorted = false ; updateLists ( ) ; for ( var i = 0 ; i < _entities . length ; i ++ ) { _entities . buffer [ i ] . _isDestroyed = true ; _entities . buffer [ i ] . onRemovedFromScene ( ) ; _entities . buffer [ i ] . scene = null ; } _entities . clear ( ) ; _entityDict . Clear ( ) ; }
removes all entities from the entities list and passes them back to the entity cache
removes all entities from the entities list and passes them back to the entity cache
// clear lists we don't need anymore // why do we update lists here? Mainly to deal with Entities that were detached before a Scene switch. They will still // be in the _entitiesToRemove list which will get handled by updateLists.