Now use the CloneEntity() function to spawn new particles.

This commit is contained in:
Stiffly
2014-04-28 17:56:05 +02:00
parent d917be0135
commit ea4b7b005e
4 changed files with 52 additions and 36 deletions
+7
View File
@@ -106,6 +106,13 @@ void GameWorld::Initialize()
emitter->SpawnFrequency = 0.08;
auto model = AddComponent<Components::Model>(ent, "Model");
model->ModelFile = "Models/Placeholders/PhysicsTest/PointLight.obj";
auto particleEnt = CreateEntity();
AddComponent<Components::Transform>(particleEnt, "Transform");
model = AddComponent<Components::Model>(particleEnt, "Model");
model->ModelFile = "Models/Placeholders/PhysicsTest/PointLight.obj";
emitter->ParticleTemplate = particleEnt;
}
}
}