I have a series of behaviors I want to enable/disable based on bit values. For example, the status of Behavior "A" is 0 or 1, Behavior "B" is 0 or 2, Behavior "C" is 0 or 4, etc. If the value of the variable containing the status is "5", I know Behavior "A" and "C" are enabled. "B" is not. My program should then toggle on A & C.
I'm not sure what this is called so hopefully someone here can give me a name and shove me in the right direction. How do I programmatically create the list of enabled functions based on the status variable? There may be 20-30 behaviors i want to control in this manner. Too many to manage manually.