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); }
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(); }
override public void execute() { obj = new CStickyObject(storage.getObject(index)); storage.deleteObject(index); index = storage.setObject(obj); }
public void onSubjectChanged(CStickyObject point) { move(point.getDX(), point.getDY()); }