private void HandleBGMovement() { if (player1.x < player1.oldX) { if (player1.x > game.width * 5 && player1.x < background.width / 2) { return; } if (player1.x > game.width / 2) { if (player1.HasPickedUpEnemy()) { background.MoveMidGround(false, true); background.MoveBackDrop(false, true); foreground.MoveForeGround(false, true); } else { background.MoveMidGround(false, false); background.MoveBackDrop(false, false); foreground.MoveForeGround(false, false); } } else { } } else if (player1.x > player1.oldX) { if (player1.x > 0 && player1.x < game.width / 2) { return; } if (player1.x < (background.width - (game.width / 2))) { //Console.WriteLine(background.width - (game.width / 2)); if (player1.HasPickedUpEnemy()) { background.MoveMidGround(true, true); background.MoveBackDrop(true, true); foreground.MoveForeGround(true, true); } else { background.MoveMidGround(true, false); background.MoveBackDrop(true, false); foreground.MoveForeGround(true, false); } } else { background.x = 0; background.y = 0; foreground.x = 0; foreground.y = 0; } } }