added code for attack animations