Added looping attack animation functionality