state
. Each state/action is a bit flag and I turn the bits on and off to check whether the action/state is being done or not.Some examples are: ATTACKING, CANTATTACK, FROZEN, etc.
The problem is, a lot of these are time-based, meaning that they turn on/off after a given period of time when they are turned on/off. So I need help on figuring on how to go about it.
I currently have one method in mind, but I would like to see what you guys think because the ideas might be much better than mine.
(My method involves creating a datum that uses the Event Loop.)
I like the idea of using a datum personally, and speaking of which, I think I'll use bit flags for status effects in my game (I didn't know how bits worked when I made it, so I have like 10 worthless Boolean vars).