示例#1
0
文件: MDRAction.cs 项目: bsimser/CoM
 /**
  * Creates an action list with given number of slots
  * @param length Number of slots to create
  */
 public MDRActionList(int length)
 {
     Slot = new MDRAction[length];
     for (int lp = 0; lp < length; lp++)
     {
         Slot[lp] = new MDRAction(ActionType.Empty);
     }
 }
示例#2
0
文件: MDRAction.cs 项目: bsimser/CoM
 /** If this list contains given action */
 public bool Contains(MDRAction action, bool deepCompare = false)
 {
     foreach (MDRAction slot in Slot)
     {
         if (deepCompare)
         {
             if (slot.CompareTo(action))
             {
                 return(true);
             }
             else if (slot == action)
             {
                 return(true);
             }
         }
     }
     return(false);
 }
示例#3
0
文件: MDRAction.cs 项目: bsimser/CoM
 /** Returns true if this action is the same as given action */
 public bool CompareTo(MDRAction otherAction)
 {
     return((this.Type == otherAction.Type) && (this.Parameter == otherAction.Parameter));
 }
示例#4
0
文件: MDRAction.cs 项目: bsimser/CoM
 /** Copyies another action this this action */
 public void CopyFrom(MDRAction source)
 {
     this._type      = source.Type;
     this._parameter = source.Parameter;
 }