What I am I trying to do is this:
[Flags]
public enum Actions
{
Action1 = 0x01,
Action2 = 0x02,
Action3 = 0x04
}
The object has the actions flag set to 7 to begin with. The object can then perform any of the actions available. But here is the kicker. The object can perform the actions in this combination:
-Action 1, Action 2, Action 3
-Action 1, Action 1, Action 3
-Action 1, Action 1, Action 2
-Action 1, Action 1, Action 1
So, actions 2 and 3 can only be used once, while action 1 can be used, upto, three times. If Action 2 or Action 3 is used, then Action 1 can only be used twice. Is this the best way to go about this? Or should I try to create a new object that will let me handle this? I would like to use enums to do this, but I can’t, for the life of me, figure out how to do this or find anything on the web regarding something like this.
Thank you, in advance, for any help that can be provided.
I enuded doing this to get it to work how I wanted.
I still need to go through and refactor, but it works so far for my need: