示例#1
0
		void update(float frameTime){
			removeDeadEntities();
			iterating = true;
			for (auto& entity : entities){
				entity->update(frameTime);
			}
			iterating = false;
			addQueueComponents();
		}
示例#2
0
void ETHEntityArray::unique()
{
	removeDeadEntities();
	std::set<ETHEntityRawPtr> entitySet;
	for (std::vector<ETHEntityRawPtr>::iterator iter = m_vector.begin(); iter != m_vector.end(); ++iter)
	{
		entitySet.insert(*iter);
	}
	clear();
	for (std::set<ETHEntityRawPtr>::iterator iter = entitySet.begin(); iter != entitySet.end(); ++iter)
	{
		push_back(*iter);
	}
}