Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // if u want, else just use int to iterate
- enum _state {controls, settings, something};
- bool[] array = new bool[3]; // all false on init
- // array[2] = true; // eg
- /* (...) */
- bool invert(enum case) {return !array[case]; }
- // or
- void invert(enum case) {array[case] = !array[case]; return; }
- //eg if u want to switch bool controls which is now true, just call:
- invert(_state.controls);
Advertisement
Add Comment
Please, Sign In to add comment