public static void RemoveNodeConnectParentToChildren(DungeonFlowNode node) { string parentNodeGuid = node.parentNodeGuid; List <string> list = new List <string>(node.childNodeGuids); DungeonFlow flow = node.flow; node.flow.DeleteNode(node, false); foreach (string text in list) { bool flag = !string.IsNullOrEmpty(parentNodeGuid) && !string.IsNullOrEmpty(text); if (flag) { DungeonFlowNode nodeFromGuid = flow.GetNodeFromGuid(parentNodeGuid); DungeonFlowNode nodeFromGuid2 = flow.GetNodeFromGuid(text); bool flag2 = nodeFromGuid != null && nodeFromGuid2 != null; if (flag2) { flow.ConnectNodes(nodeFromGuid, nodeFromGuid2); } } } }