In a platformer I'm designing, I have a few animations for attack. Some 3 frames long, some 4. I was wanting to spawn hitboxes at certain frames in each attack animation. Each of these hitboxes would then, on collision with something in the enemy family, add to it's damage private variable and push them back a x amount of pixels.
I was wondering how would I tell the hitbox to spawn only during certain frames?