private void decodeScript(int stepId) { loadConditions(); _taskStepData = _taskData.stepList[stepId]; if (_taskStepData.dialogId != 0) { showDialogPanel(Convert.ToInt32(_taskStepData.dialogId)); } if (_taskStepData.cameraMoveId != 0) { showCameraEffect(Convert.ToInt32(_taskStepData.cameraMoveId)); } }
public void decode(XmlElement node) { id = Convert.ToInt32(node.GetAttribute("id")); name = Convert.ToString(node.GetAttribute("name")); string preTaskStr = Convert.ToString(node.GetAttribute("pretask")); preTaskList = preTaskStr.Split(','); string openTaskStr = Convert.ToString(node.GetAttribute("opentask")); openTaskList = openTaskStr.Split(','); XmlNodeList nodeList = node.GetElementsByTagName("Step"); stepList = new Dictionary <int, MTBTaskStepData>(); foreach (XmlElement item in nodeList) { MTBTaskStepData data = new MTBTaskStepData(); data.decode(item); stepList.Add(data.id, data); } }
public PlotStepCondition(MTBTaskData taskData, MTBTaskStepData stepData) { MTBTaskConditionData data = MTBTaskConditionManager.Instance.getData(stepData.condtion); startTriggerCondition = TaskConditionFactory.GetStartTriggerCondition(data.startTriggerCondition.scriptName); startTriggerCondition.taskId = taskData.id; startTriggerCondition.stepId = stepData.id; startTriggerCondition.setParams(data.startTriggerCondition.paras); finishTriggerCondition = TaskConditionFactory.GetFinishTriggerCondition(data.finishTriggerCondition.scriptName); finishTriggerCondition.taskId = taskData.id; finishTriggerCondition.stepId = stepData.id; finishTriggerCondition.setParams(data.finishTriggerCondition.paras); finishCondition = TaskConditionFactory.GetFinishCondition(data.finishCondition.scriptName); finishCondition.taskId = taskData.id; finishCondition.stepId = stepData.id; finishCondition.setParams(data.finishCondition.paras); tipStr = data.tipsCondition.content; }