Beispiel #1
0
void ActorSet::_spawn(const SpawnRequest &spawnData)
{
	const ComponentDataSet &data = spawnData.get<0>();
	const vec3 &position = spawnData.get<1>();
	const vec3 &velocity = spawnData.get<2>();

	const tuple<OBJECT_ID, ActorPtr> t = create();
	const ActorPtr object = t.get<1>();
	
	object->load(data, position, velocity, world);
	object->enableDebugRendering(displayDebugRendering);
}
Beispiel #2
0
void ActorSet::enableDebugRendering(bool enable)
{
	for(iterator i = begin(); i!=end(); ++i)
	{
		ActorPtr actor = i->second;

		if(actor)
		{
			actor->enableDebugRendering(enable);
		}
	}

	displayDebugRendering = enable;
}