Exemplo n.º 1
0
        void AddChildrenToSerializedNodes(CGME.ActionIfThenElse parent_action, SerialNode parent_node)
        {
            // Create a NODE for each ACTION CHILD and add them to the list
            // save the index of each CHILDREN NODE to the PARENT NODE

            SerialNode if_node   = AddNode(parent_action.GetIF(), parent_node);
            SerialNode then_node = AddNode(parent_action.GetTHEN(), parent_node);
            SerialNode else_node = AddNode(parent_action.GetELSE(), parent_node);

            // For every child that can have children (actiongroup),
            // call the funcion again sending its index

            AddChildrenToSerializedNodes(parent_action.GetIF(), if_node);
            AddChildrenToSerializedNodes(parent_action.GetTHEN(), then_node);
            AddChildrenToSerializedNodes(parent_action.GetELSE(), else_node);
        }
Exemplo n.º 2
0
 void DisplayBody(CGME.ActionIfThenElse action)
 {
     EditorGUI.indentLevel++;
     {
         DisplayAction(action.GetIF(), null);
         DisplayAction(action.GetTHEN(), null);
         DisplayAction(action.GetELSE(), null);
     }
     EditorGUI.indentLevel--;
 }