public override void ApplyReverse(DialogEditorCtrlZ _dialogEditorCtrlZ) { if (targetNode is DialogNode) { targetNode = targetDialog.AddDialogNodeNoCtrlZ(targetNode as DialogNode); _dialogEditorCtrlZ.UpdateRef(copy, targetNode, this); } else if (targetNode is SubDialogNode) { targetNode = targetDialog.AddSubDialogNoCtrlZ(copy as SubDialogNode); _dialogEditorCtrlZ.UpdateRef(copy, targetNode, this); } }
public CtrlZNodeDeleted(DialogEditorCtrlZ _dialogEditorCtrlZ, BaseNode _targetNode, Dialog _targetDialog) : base(eCtrlZAction.NodeDeleted, _targetNode, _targetDialog) { if (targetNode is DialogNode) { copy = new DialogNode(_targetNode as DialogNode); _dialogEditorCtrlZ.UpdateRef(targetNode, copy, this); } else if (_targetNode is SubDialogNode) { copy = new SubDialogNode(_targetNode as SubDialogNode); _dialogEditorCtrlZ.UpdateRef(targetNode, copy, this); } }
public override void Apply(DialogEditorCtrlZ _dialogEditorCtrlZ) { if (targetNode is DialogNode) { copy = new DialogNode(targetNode as DialogNode); _dialogEditorCtrlZ.UpdateRef(targetNode, copy, this); targetDialog.RemoveDialogNode(targetNode as DialogNode, false); } else if (targetNode is SubDialogNode) { copy = new SubDialogNode(targetNode as SubDialogNode); _dialogEditorCtrlZ.UpdateRef(targetNode, copy, this); targetDialog.RemoveSubDialogNode(targetNode as SubDialogNode, false); } }