My enemies are in an array.

I want my enemies to make me lose health points when they are on the stage for a certain time.


So if an enemy pops up on the stage and is on the stage for 10 seconds or something without being killed it will make me lose HP.

Right now I'm thinking of a timer. But it isn't working that great.

Please help me