Fixed enemy sprite animation logic

Changed the logic used for deciding enemy animations.
Also fixed the projectile animation.