public void Undo(EditorController ec) { ec.DoAddLine(sx, sy); foreach (var c in commands) { c.Undo(ec); } }
public void Redo(EditorController ec) { placed = ec.AddFromPalette(x, y, code); level = ec.level; if (color.HasValue) { placed.color = color.Value; } }
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); }
public void Redo(EditorController ec) { ec.DoAddLine(sx, sy); }
public void Undo(EditorController ec) { eo.transform.SetParent(_originParent, true); }
public void Redo(EditorController ec) { _originParent = eo.transform.parent; eo.transform.SetParent(ec.removedDomain, true); }
public void Undo(EditorController ec) { color = placed.color; GameObject.Destroy(placed.gameObject); }