I have this sprite with an attack animation set to the 'spacebar' key. Whenever it's pressed and collides with an enemy, I want the enemy to die. But instead every time I press spacebar on collision with the enemy nothing seems to happen.
I am using a boolean variable that sets to true when the player collides with the enemy. I feel like I am doing something very wrong here?
Also, if say the attack animation just constantly plays after pressing spacebar once and keeps hitting things non- stop, would I need to put a 'is animation attacking playing' then set attack variable to false?