how to keep track of time (to have player ignore damage for 3 seconds)?
<p>I have some code that looks like this: </p>

<pre><code>if there is a collision between player and enemy
    player.health--
</code></pre>

<p>I want to do this: </p>

<pre><code>if there is a collision between player and enemy
    player.health--
    wait for 3 seconds
</code></pre>

<p>This is to ignore collision for a bit so player's health doesn't instantly drop to 0. </p>

<p>How would I implement some sort of timer for this? </p>
