Adaptation is influenced by the complexity of environmental change during evolution in a dynamic environment