Partycles.

This commit is contained in:
Stiffly
2015-10-06 21:42:54 +02:00
parent ca810743b2
commit 8b12c1036d
8 changed files with 124 additions and 49 deletions
+2 -1
View File
@@ -53,7 +53,8 @@ public:
/// Register a destruction listener. The listener is owned by you and must
/// remain in scope.
void SetDestructionListener(b2DestructionListener* listener);
void
SetDestructionListener(b2DestructionListener* listener);
/// Register a contact filter to provide specific control over collision.
/// Otherwise the default filter is used (b2_defaultFilter). The listener is
+1 -1
View File
@@ -654,7 +654,7 @@ int32 b2ParticleSystem::CreateParticle(const b2ParticleDef& def)
// If the oldest particle should be destroyed...
if (m_def.destroyByAge)
{
DestroyOldestParticle(0, false);
DestroyOldestParticle(0, true);
// Need to destroy this particle *now* so that it's possible to
// create a new particle.
SolveZombie();
+2 -2
View File
@@ -299,7 +299,7 @@ public:
/// b2World::Step()).
void DestroyParticle(int32 index)
{
DestroyParticle(index, false);
DestroyParticle(index, true);
}
/// Destroy a particle.
@@ -330,7 +330,7 @@ public:
/// @return Number of particles destroyed.
int32 DestroyParticlesInShape(const b2Shape& shape, const b2Transform& xf)
{
return DestroyParticlesInShape(shape, xf, false);
return DestroyParticlesInShape(shape, xf, true);
}
/// Destroy particles inside a shape.