public override bool CompareTo(Command commandToCompare)
 {
     if (commandToCompare is FillCellUndo)
     {
         FillCellUndo commandComaparer = commandToCompare as FillCellUndo;
         if (ComapreArrays(commandComaparer.LayerStateBeforeRecursion.TileMapArray, this.LayerStateBeforeRecursion.TileMapArray) )
         {
             return true;
         }
         else
             return false;
     }
     else
     {
         return false;
     }
 }
 public override bool CompareTo(Command commandToCompare)
 {
     if (commandToCompare is EraseCellCommand)
     {
         EraseCellCommand commandComaparer = commandToCompare as EraseCellCommand;
         if( (commandComaparer.TileLocation == this.TileLocation) && (commandComaparer.PreviousTexture == this.PreviousTexture) )
         {
             return true; // Same Object
         }
         else
             return false;
     }
     else
     {
         return false;
     }
 }
예제 #3
0
 public abstract bool CompareTo(Command commandToCompare);