private void UpdateParticles(GameTime gameTime) { if (IsUnderWater) { _bubbleParticleSystem.SetCamera(_game.Camera.View, _game.Camera.Projection); _bubbleParticleSystem.Update(gameTime); Vector3 offset = new Vector3((float)(r.NextDouble() - r.NextDouble()) * 5, (float)(r.NextDouble() - r.NextDouble()) * 5, (float)(r.NextDouble() - r.NextDouble()) * 5); _bubbleParticleSystem.AddParticle(_game.Camera.Position + offset, Vector3.Zero); } if (IsAboveSnowLine) { _snowParticleSystem.SetCamera(_game.Camera.View, _game.Camera.Projection); _snowParticleSystem.Update(gameTime); Vector3 offset = new Vector3((float)(r.NextDouble() - r.NextDouble()) * 5, (float)(r.NextDouble()) * 5, (float)(r.NextDouble() - r.NextDouble()) * 5); _snowParticleSystem.AddParticle(_game.Camera.Position + offset, Vector3.Zero); _snowParticleSystem.AddParticle(_game.Camera.Position + offset, Vector3.Zero); } }