IEnumerator makeDecisionCoroutine(int dV) { decisionValue = dV; decisionPanel.gameObject.SetActive(false); emotionPanel.gameObject.SetActive(false); resetEmotionButtons(); yield return(new WaitForEndOfFrame()); //if (decisionAgent.ControlledByHuman) // MascaretHumanActions.executeOperation(choiceNodes[decisionValue], decisionAgent); MascaretHumanActions.changeConstraintValue(DecisionAgent, "decisionValue", decisionValue); }
override public double execute(double dt) { if (state == 0) { /* * ActionNode currentNode = MascaretUtils.getCurrentActionNode(agent); * MascaretHumanActions.changeConstraintValue(ui.DecisionAgent, "decisionValue", -1); * ui.decisionValue = -1; * choices = MascaretUtils.getOutgoingNodes(agent, currentNode); * MascaretHumanActions.setConstrainedEdges(MascaretUtils.getOutgoingEdges(agent, currentNode)); * PrintSingleton.Instance.log("==================================== DECISION ========================================== " + choices.Count); * ui.DisplayChoices(choices, agentC); */ ActionNode currentNode = MascaretUtils.getCurrentActionNode(agent); PrintSingleton.Instance.log("==================================== DECISION ========================================== " + currentNode.name); MascaretHumanActions.setConstrainedEdges(MascaretUtils.getOutgoingEdges(agent, currentNode)); ui.DisplayChoices(MascaretUtils.getOutgoingNodes(agent, currentNode), agentC); state++; MascaretHumanActions.changeConstraintValue(ui.DecisionAgent, "decisionValue", -1); return(Time.deltaTime); } else { if (ui.decisionValue != -1) { PrintSingleton.Instance.log("Decision : " + ui.decisionValue); return(0); } /*else * { * MascaretHumanActions.resetConstraints(); * return Time.deltaTime; * }*/ return(Time.deltaTime); } }
public void startProcedure(string procedure_name) { ProcedureBehaviorExecution = MascaretHumanActions.startProcedure(procedure_name); }