Function to handle movement speed change

Pass in the current x and the speed and it will figure out how fast to
move the enemy