Esempio n. 1
0
void EntitySimulation::clearEntities() {
    _mortalEntities.clear();
    _nextExpiry = quint64(-1);
    _updateableEntities.clear();
    _entitiesToBeSorted.clear();
    clearEntitiesInternal();
}
Esempio n. 2
0
void EntitySimulation::clearEntities() {
    _mortalEntities.clear();
    _nextExpiry = quint64(-1);
    _entitiesToUpdate.clear();
    _entitiesToSort.clear();
    _simpleKinematicEntities.clear();
    _entitiesToDelete.clear();

    clearEntitiesInternal();

    for (auto entityItr : _allEntities) {
        entityItr->_simulated = false;
    }
    _allEntities.clear();
}
Esempio n. 3
0
void EntitySimulation::clearEntities() {
    QMutexLocker lock(&_mutex);
    _mortalEntities.clear();
    _nextExpiry = quint64(-1);
    _entitiesToUpdate.clear();
    _entitiesToSort.clear();
    _simpleKinematicEntities.clear();

    clearEntitiesInternal();

    for (auto entity : _allEntities) {
        entity->setSimulated(false);
        entity->die();
    }
    _allEntities.clear();
    _entitiesToDelete.clear();
}