Implement animated sprites for enemies
Factor out animation code, so it can be used elsewhere