private void Release(Vector2 position, int numToRelease, float layerDepth = 0) { var iterator = Buffer.Release(numToRelease); while (iterator.HasNext) { var particle = iterator.Next(); Vector2 heading; Profile.GetOffsetAndHeading(out particle->Position, out heading); particle->Age = 0f; particle->Inception = _totalSeconds; particle->Position += position; particle->TriggerPos = position; var speed = _random.NextSingle(Parameters.Speed); particle->Velocity = heading * speed; _random.NextColor(out particle->Color, Parameters.Color); particle->Opacity = _random.NextSingle(Parameters.Opacity); var scale = _random.NextSingle(Parameters.Scale); particle->Scale = new Vector2(scale, scale); particle->Rotation = _random.NextSingle(Parameters.Rotation); particle->Mass = _random.NextSingle(Parameters.Mass); particle->LayerDepth = layerDepth; } }