private void AddUpgradeObjects() { // Randomly generate the position of the upgrade object Vector2 position = new Vector2(random.Next(250, 750), 10); //Vector2 position = new Vector2(random.Next(100, GraphicsDevice.Viewport.Width - 100), GraphicsDevice.Viewport.Height - upgradeObjectTexture.Height / 2); // 50, and -50 represent the area in which they spawn (higher the number the smaller the area, closer to center) UpgradeObject upgradeObject = new UpgradeObject(); upgradeObject.Initialize(GraphicsDevice.Viewport, upgradeObjectTexture, position); upgradeObjects.Add(upgradeObject); /* if (levelUp == true) { upgradeObject.Value = upgradeObject.Value + 10; upgradeObject.upgradeObjectMoveSpeed = upgradeObject.upgradeObjectMoveSpeed + 5; } */ }