Positioning out-of-sub particles relative to the level, easier to climb stairs

This commit is contained in:
Regalis
2015-11-22 17:11:13 +02:00
parent 1eaf22d3d0
commit 77024a31fb
17 changed files with 41 additions and 33 deletions
@@ -51,14 +51,14 @@ namespace Barotrauma.Particles
ParticleAmount = ToolBox.GetAttributeInt(element, "particleamount", 1);
}
public void Emit(Vector2 position)
public void Emit(Vector2 position, Hull hullGuess = null)
{
for (int i = 0; i<ParticleAmount; i++)
{
float angle = Rand.Range(AngleMin, AngleMax);
Vector2 velocity = new Vector2((float)Math.Cos(angle), (float)Math.Sin(angle)) * Rand.Range(VelocityMin, VelocityMax);
GameMain.ParticleManager.CreateParticle(particlePrefab, position, velocity);
GameMain.ParticleManager.CreateParticle(particlePrefab, position, velocity, 0.0f, hullGuess);
}
}
}