public NodeWrapper GetCurrentAction() { NodeWrapper node = new NodeWrapper(); node.NodeName = "[UNDEFINED]"; node.Arguments = new List <Argument>(); node.CallingClass = ""; if (current != null && current.NodeType == NodeType.MethodNode) { SerializeableDynamicNode method = current as SerializeableDynamicNode; node.NodeName = method.NodeName; node.Arguments = method.Arguments; node.CallingClass = method.CallingClass; } return(node); }
public SerializeableNodeViewModel GoToNextNode() { if (current != null) { int nextID = 0; if (current.NodeType == NodeType.RootNode) { SerializeableRootNode root = current as SerializeableRootNode; nextID = root.OutputNodeID; } if (current.NodeType == NodeType.MethodNode) { SerializeableDynamicNode method = current as SerializeableDynamicNode; nextID = method.OutputNodeID; } if (current.NodeType == NodeType.ConditionNode) { SerializeableConditionNode condition = current as SerializeableConditionNode; string varToCheck = condition.BoolVariableName; bool toCheck = getBoolVariableValue(condition.BoolVariableName, condition.BoolCallingClass); if (toCheck == true) { nextID = condition.OutputTrueNodeID; } else { nextID = condition.OutputFalseNodeID; } } current = getNodeByID(nextID); } //mark as not active if (current == null) { IsActive = false; } return(current); }