Say I want an if statement that will only fire once each game.
It seems like a waste of effort for me to let the cpu ever check the validity of that condition again once this has happened.
Is there a way to somehow not have this checking ever again?
It mind not result in any significant performance gain at all.
But I'm just curious.
I would like a generic solution that's why I keep it so vague, because I run in these kinds of situations quite often.
Pseudocode:
if(CoinCollected && !CoinCollectedBefore)
{
//Do stuff
}