I want to check a condition of a certain object every frame. Then based on this call one of my own methods on this object only once! At the moment the way I do this is with a boolean value and an if condition in my update that checks the flag and I then have the boolean toggle over when I call the method (and then reset it too if need be) but that seems inelegant. Is there a better way to do this or have I done it the right way?
if(condition == true)
{
condition = false;
DoThis();
}