Esempio n. 1
0
 public void execute(MyStorage _storage, int _ind)
 {
     storage = _storage;
     index   = _ind;
     obj     = new CStickyObject(storage.getObject(index));
     storage.deleteObject(index);
     index = storage.setObject(obj);
     Console.WriteLine(index);
 }
Esempio n. 2
0
 public void ChangeChoosenObjects(Command doCommand, int MAXx, int MAXy, Stack <Command> history)
 {
     for (int i = 0; i < Count; i++)
     {
         if (arr[i].IsObjectSelected() == true)
         {
             if (arr[i].IsA("CStickyObject") == true)
             {
                 CStickyObject s = (CStickyObject)arr[i];
                 for (int j = 0; j < Count; j++)
                 {
                     if (j != i)
                     {
                         s.roll(arr[j]);
                     }
                 }
             }
             Command newCommand = doCommand.clon();
             newCommand.execute(arr[i], MAXx, MAXy);
             history.Push(newCommand);
         }
     }
     notifyEveryone();
 }
Esempio n. 3
0
 override public void execute()
 {
     obj = new CStickyObject(storage.getObject(index));
     storage.deleteObject(index);
     index = storage.setObject(obj);
 }
Esempio n. 4
0
 public void onSubjectChanged(CStickyObject point)
 {
     move(point.getDX(), point.getDY());
 }