public void hintClick() { toolMenu.cancelToolFollow(); List <string> valueString = new List <string>(TrainingManager.GetVaraiableStringValue("工具").ToString().Split(',')); if (valueString.Count == 1) { string toolName = valueString[0]; if (toolName.Equals("wanyongbiao")) { //if (alertMSG != null) // Destroy(alertMSG.gameObject); multimeter.gameObject.SetActive(true); multimeter.setShowNumber(circuitTopics[currentCircuit][0].ShowValue); hintBtn.GetComponent <UIButton>().enabled = false; } else { error(); showAlertMSG("操作错误!"); } } else { error(); showAlertMSG("操作错误!"); } PluginEventManager.FireEvent("RecordTools", ""); }
public void hideTrainStart() { if (!dynamiclistUI.getIsShow()) { dynamiclistUI.showSpInfoUI(); } mouseFocus.cancelHighLightObj(); mouseFocus.reset(); isShowTrainStart = false; trainStartUI.gameObject.SetActive(false); if (!isStartTrain) { mouseFocus.ForbiddenWalk(true); TrainingBigFlow trainingFlow = TrainingManager.flows[this.CurrentTrainFlow]; addHintMSG(trainingFlow.operateHint); if (currentTrainMode == TrainMode.Study) { PluginEventManager.FireEvent("StartPlayFlow", this.CurrentTrainFlow + ",自动浏览,0"); //自动浏览 } else if (currentTrainMode == TrainMode.Training) { PluginEventManager.FireEvent("StartPlayFlow", this.CurrentTrainFlow + ",半自动浏览,0"); //半自动浏览 } else if (currentTrainMode == TrainMode.Exam) { PluginEventManager.FireEvent("StartPlayFlow", this.CurrentTrainFlow + ",考核,0"); //考核 examCountDown.startTimer(); } isStartTrain = true; } }
/// <summary> /// 流程菜单流程选项点击事件 /// </summary> /// <param name="flowIndex"></param> public void flowOperateMenuClick(int flowIndex) { uitool.controlPanel.SetActive(true); changgeMenuMovie(); UIManager.getInstance().selectTopicUI.mask.SetActive(false); errorCount = 0; if (flowMovie.activeSelf) { flowMovie.SetActive(false); movieManager.OnStop(); } flowOperateImage.SetActive(false); flowOperateMovie.SetActive(false); UIManager.getInstance().selectTopicUI.gameObject.SetActive(false); indexNumber = flowIndex; uitool.setShiwaiSliderValue(Convert.ToSingle(indexNumber + 1) / Convert.ToSingle(count), indexNumber + 1, count); if (this.currentTrainMode == TrainMode.Training) { PluginEventManager.FireEvent("StartPlayFlow", this.CurrentTrainFlow + ",半自动浏览," + flowIndex); } else if (this.currentTrainMode == TrainMode.Study) { PluginEventManager.FireEvent("StartPlayFlow", this.CurrentTrainFlow + ",自动浏览," + flowIndex); } else if (this.currentTrainMode == TrainMode.Exam) { PluginEventManager.FireEvent("StartPlayFlow", this.CurrentTrainFlow + ",考核," + flowIndex); } trainEndUI.gameObject.SetActive(false); }
public void toolMenuItemClick(GameObject obj) { isClickTool = true; if (action != null) { action(obj.name); } PluginEventManager.FireEvent("RecordTools", toolModes[obj.name].SpriteName); toolFollow.gameObject.SetActive(true); currentTool = obj.name; toolFollow.atlas = atlas; toolFollow.spriteName = toolModes[obj.name].SpriteName; }
private void twinkle() { if (isTwinkle && !isMouseover) { curTime += Time.deltaTime; if (curTime > 1) { curTime -= 1; PluginEventManager.FireEvent("ModelEffect", trageName + ",0,0,0"); } else if (curTime > 0.5) { PluginEventManager.FireEvent("ModelEffect", trageName + ",1,0,0"); } } }
IEnumerator errorDispose() { float time = 5; float errorTime = 3; changeCamera(TrainingManager.getTrainingOperateState().target.targets[0]); //界面显示正确的工具物品 showAlertMSG("操作错误三次,自动操作!"); if (!TrainingComponent.currState.target.isSelectTopics) { setActiveIcon(true); } if (UIManager.getInstance().selectTopicUI.gameObject.activeSelf) { UIManager.getInstance().selectTopicUI.mask.SetActive(true); showAlertMSG("正确答案为" + UIManager.getInstance().selectTopicUI.getSelectTopicDic()[selectTopicIndex].result); while (errorTime > 0) { errorTime -= Time.deltaTime; yield return(null); } UIManager.getInstance().selectTopicUI.gameObject.SetActive(false); UIManager.getInstance().selectTopicUI.mask.SetActive(false); setActiveIcon(false); showAlertMSG(""); } while (time > 0) { time -= Time.deltaTime; yield return(null); } if (TrainingManager.getTrainingOperateState() != null) { if (TrainingManager.getTrainingOperateState().requirement.formulars.Count > 0) { PluginEventManager.FireEvent("RecordTools", TrainingManager.getTrainingOperateState().requirement.formulars[0].formulars[0]); } else { PluginEventManager.FireEvent("RecordTools", ""); } } TrainingManager.MouseLeftClick(TrainingManager.getTrainingOperateState().target.targets[0]); TrainingComponent.PlayNextComponent(); }
void Update() { if (currTime != -1) { currTime += Time.deltaTime; if (currTime % 0.6f < 0.3f) { PluginEventManager.FireEvent("ModelEffect", TrainingManager.getTrainingOperateState().target.targets[0] + ",0,0,0"); } else if (currTime % 0.6f < 0.6f) { PluginEventManager.FireEvent("ModelEffect", TrainingManager.getTrainingOperateState().target.targets[0] + ",1,0,0"); } if (currTime > 2) { PluginEventManager.FireEvent("ModelEffect", TrainingManager.getTrainingOperateState().target.targets[0] + ",1,0,0"); currTime = -1; myLocatObject(true); } } }