public void UnqueryBehaviorGraph(object obj) { if (UserGraph == null) { return; } var knowledge = obj as IKnowledge; Debug.Assert(knowledge != null); var node = UserGraph.UpdateSolvingCache(knowledge, false); if (node != null) { object obj1 = UserGraph.SearchPrevInnerLoopNode(node); var obj1Node = obj1 as BehaviorGraphNode; var obj1Lst = obj1 as List <BehaviorGraphNode>; if (obj1Node != null) { CurrentStateNode = obj1Node; } if (obj1Lst != null && obj1Lst.Count != 0) { CurrentStateNode = obj1Lst[0]; } } }
public void Reset(object obj) { if (obj == null) { _currentStepHintRequired = true; //_currentStepAnswerRequired = true; CurrentStateNode = null; } else { if (TutorMode) { var node = UserGraph.SearchInnerLoopNode(obj); object obj1 = UserGraph.SearchPrevInnerLoopNode(node); var obj1Node = obj1 as BehaviorGraphNode; var obj1Lst = obj1 as List <BehaviorGraphNode>; if (obj1Node != null) { CurrentStateNode = obj1Node; } if (obj1Lst != null) { CurrentStateNode = obj1Lst[0]; } _currentStepHintRequired = true; //_currentStepAnswerRequired = true; } else { var node = ObjectGraph.SearchInnerLoopNode(obj); object obj1 = ObjectGraph.SearchPrevInnerLoopNode(node); var obj1Node = obj1 as BehaviorGraphNode; var obj1Lst = obj1 as List <BehaviorGraphNode>; if (obj1Node != null) { CurrentStateNode = obj1Node; } if (obj1Lst != null) { CurrentStateNode = obj1Lst[0]; } } } }