At the moment, I have the enemies in the CHARGING state moving towards the player and when they collide they enter the PULLING state where the velocities of both the enemy and the player change.
Then in the main loop, if the player is moving up and there are no enemies pulling them, the player's velocity is reversed until they reach the bottom of the screen again.
The problem I have at the moment is that when the enemy collides with the left or right edges of the player then the enemy enters the PULLING state but it hthen becomes harder to destroy the enemies. This is because the player can only move a bit at a time and this may be unfair (but then again it might make sense if you consider it a tractor beam). I already ignore collisions to the back of the player as it is impossible to destroy anything behind you but with left and right collisions it's not impossible just quite hard.
So I'm in two minds as to keep left/right collisions as pulling the player and sort out the movement or to do something else (e.g leave the screen like I plan to do for when enemies are below the player). Does anyone have any ideas?
Thanks for reading