This time saving function will loop a certain animation ( currently idle,die,hit,move,attack ) for any monster, and can also check if the animation is already playing, or check which animation is play