So I'm working on something that is supposed to be akin to Bubble Bobble or Parasol Star genre-wise. I'm trying to make it so that when the enemy is first hit with a projectile, they become 'stunned' (turn blue, stop moving) and are either 1. shot again, flung into a wall and become a pick up item or 2. if they aren't shot or otherwise destroyed within a period of time, they become 'angry' (turn red, move at 1.5x speed). Not working on enemy behavior quite yet, but right now everything seems to be working properly otherwise EXCEPT the color changing. The first enemy shot changes from green to blue to red OK, but any enemy shot after that does not visibly change color. The current behavior works, however (if I shoot them twice, they fly straight ahead and become an item) so I know their state is changing properly, which should change their color. I've tried a couple things but not sure where my logic is failing on this one. Anyone have ideas?
(Controls: Move with arrow keys inc. jumping with up arrow, shoot projectile with space bar)