private SnowFlake GenerateParticle() { var sprite = new SnowFlake(_snowFlakeParticle); var xPosition = MathUtilities.Random.Next(_snowingBounds.X, _snowingBounds.Width); var ySpeed = MathUtilities.Random.Next(70, 75) / 100f; sprite.Position = new Vector2(xPosition, -sprite.Bounds.Height); sprite.Opacity = (float)MathUtilities.Random.NextDouble(); sprite.Velocity = new Vector2(0, ySpeed); return(sprite); }
private bool IsOnScreen(SnowFlake snowFlake) { return(snowFlake.Position.Y <= (_snowingBounds.Y + _snowingBounds.Height + 10)); }