Timings and one Time Actions
Hello community,
whats your philosophy for time in game programing? I am not a studied programer, but i managed to do it like this:
Set a counter to 0 in the init unit. Then count +1 in the update unit, if the counter reaches one point divided/60 (for seconds) sth. happens. After all, i set the counter to 0 again, and the loop starts again. But what can i do with one time actions?
For instance, the player is moving to a switch and a door opens. Is there a possibility to do things only once?
Thanks for your answers and have a good time :)