Пример #1
0
 public bool GetActionFlag(ActionFlagEnum actionFlag)
 {
     System.Diagnostics.Debug.Assert(!actionFlagDict.ContainsKey(actionFlag),
                                     string.Format("error: action flag {0} not initialized.", actionFlag.ToString()));
     return(actionFlagDict[actionFlag] >= 0);
 }
Пример #2
0
 public void ModiflyAction(ActionFlagEnum actionFlag, bool active)
 {
     System.Diagnostics.Debug.Assert(!actionFlagDict.ContainsKey(actionFlag),
                                     string.Format("error: action flag {0} not initialized.", actionFlag.ToString()));
     actionFlagDict[actionFlag] += active ? 1 : -1;
 }