Exemple #1
0
 /**
  * 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);
     }
 }
Exemple #2
0
 /** 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);
 }
Exemple #3
0
 /** 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));
 }
Exemple #4
0
 /** Copyies another action this this action */
 public void CopyFrom(MDRAction source)
 {
     this._type      = source.Type;
     this._parameter = source.Parameter;
 }