public void Redo(EditorController ec) { ec.DoRemoveLine(sx, sy); List <GameObject> removedObject = new List <GameObject>(); foreach (Transform eo in ec.level.objectsDomain) { if (!ec.level.IsValidCoord((int)eo.position.x, (int)eo.position.y)) { removedObject.Add(eo.gameObject); } } foreach (var eo in removedObject) { ICommand command = new RemoveObjectCommand(eo.gameObject); command.Redo(ec); commands.Push(command); } }
public void Undo(EditorController ec) { ec.DoRemoveLine(sx, sy); }