Functionalised the animation part of the player update