worked on animation function for sprite body.