- The emission rate of ParticleEmitters can be set as particles per second (instead of particles per frame).
- Particles that are outside the sub aren't visible inside hulls even if they overlap with the sub. - ParticleManager takes the movement of the particles into account when determining which particles to cull. For example, a particle that will move upwards can be emitted even if it's below the camera view.
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Barotrauma
|
||||
{
|
||||
private Sound sound;
|
||||
|
||||
private ParticleEmitterPrefab particleEmitterPrefab;
|
||||
private ParticleEmitter particleEmitterPrefab;
|
||||
|
||||
partial void InitProjSpecific(XElement element)
|
||||
{
|
||||
@@ -23,18 +23,18 @@ namespace Barotrauma
|
||||
switch (subElement.Name.ToString().ToLowerInvariant())
|
||||
{
|
||||
case "particleemitter":
|
||||
particleEmitterPrefab = new ParticleEmitterPrefab(subElement);
|
||||
particleEmitterPrefab = new ParticleEmitter(subElement);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
partial void DamageParticles(Vector2 worldPosition)
|
||||
partial void DamageParticles(float deltaTime, Vector2 worldPosition)
|
||||
{
|
||||
if (particleEmitterPrefab != null)
|
||||
{
|
||||
particleEmitterPrefab.Emit(worldPosition);
|
||||
particleEmitterPrefab.Emit(deltaTime, worldPosition);
|
||||
}
|
||||
|
||||
if (sound != null)
|
||||
|
||||
Reference in New Issue
Block a user