YORK City earned a third consecutive win as they turned on the style in the second half to seal a 3-1 win at relegation-threatened AFC Fylde.