public void empty() { FILEPATH = Application.dataPath + "\\StreamingAssets\\Programs\\"; GSKFile = new ROBOTFILE(FILEPATH); button = GameObject.Find("MyButton").GetComponent <ButtonRespond>(); ScreenScript = GameObject.Find("MyScreen").GetComponent <ScreenBuild>(); MotionScript = GameObject.Find("MyMotion").GetComponent <RobotMotion>(); TipsShow = GameObject.Find("MainScript").GetComponent <TipsWindow>(); Voice = GameObject.Find("MainScript").GetComponent <doVoiceExe>(); TipsMo = new TipsMotion(); TipsManager = new TipsInfoManager(); }
//Tips表格信息提取 public bool TipsAdd(DataRow tips_row, string id) { bool isRight = true; TipsInfoManager tipsMana = new TipsInfoManager(); TipsMotion tipsExcel = tipsMana.TipsInfoGet(tips_row, id, ref isRight); if (!isRight) { return(false); } _motionList.Add(tipsExcel); _hasTipsMotion = tipsExcel; simpleID.Add(simpleID.Count, id); return(true); }
public void Initial(string casename, string filename) { ObjectInitial(); StageTotal = 0; stage_current = 0; DetectNo = 0; caseName = casename; FileName = filename; TipsShow = GameObject.Find("MainScript").GetComponent <TipsWindow>(); Voice = GameObject.Find("MainScript").GetComponent <doVoiceExe>(); TipsMo = new TipsMotion(); TipsManager = new TipsInfoManager(); button = GameObject.Find("MyButton").GetComponent <ButtonRespond>(); FILEPATH = Application.dataPath + "\\StreamingAssets\\Programs\\"; GSKFile = new ROBOTFILE(FILEPATH); ScreenScript = GameObject.Find("MyScreen").GetComponent <ScreenBuild>(); MotionScript = GameObject.Find("MyMotion").GetComponent <RobotMotion>(); CalculateTotalStage(); CaseIntro.SetActive(true); CaseIntro.CaseStart(casename); PanelInitial();//面板初始化 }
//Tips控制模块 private IEnumerator TipsCoroutine(string tips_str, DataTable tips_table) { //获取Tips ID string tipsKeyStr = InterData.CmdCheck(tips_str, "TIPS"); if(tipsKeyStr != ""){ //Tips信息提取 DataRow tipsRowData = tips_table.Rows.Find(tipsKeyStr); //ID获取TIPS行失败 if(tipsRowData == null){ MotionPara.shouldStop = stopInRow; if(MotionPara.isEditor){ Debug.LogError(ErrorLocation.Locate("MAIN", "TIPS", MotionPara.mainRowNumber) + ", TIPS 没有这个ID!"); } yield break; } bool isRight = true; TipsInfoManager tempInfoManager = new TipsInfoManager(); tipsAdministrator = tempInfoManager.TipsInfoGet(tipsRowData, tipsKeyStr, ref isRight); if(!isRight){ MotionPara.shouldStop = stopInRow; yield break; } if (!computeTime) { tipsAdministrator.Init(); startTime = 0; MotionPara.MotionActive = true; st_Interface.Voice(tipsAdministrator.TipsString, tipsAdministrator.TipsSpeed); if (tipsAdministrator.IsString) { if (tipsAdministrator.IsTitle) st_Interface.TipsWindow(true, tipsAdministrator.TipsString, tipsAdministrator.IsMoveable, tipsAdministrator.PosString, WindowColor.Blue); else st_Interface.TipsWindow(true, tipsAdministrator.TipsString, tipsAdministrator.IsMoveable, tipsAdministrator.PosString); } else { if (tipsAdministrator.IsTitle) st_Interface.TipsWindow(true, tipsAdministrator.TipsString, tipsAdministrator.IsMoveable, tipsAdministrator.PosVec2, WindowColor.Blue); else st_Interface.TipsWindow(true, tipsAdministrator.TipsString, tipsAdministrator.IsMoveable, tipsAdministrator.PosVec2); } yield return StartCoroutine(TipsTimer()); } else {//加速运行,计算时间 tipsTime = tipsAdministrator.StandardTime; tipsAdministrator.PostProcess(); } }else{ MotionPara.shouldStop = stopInRow; //编辑器模式下会出现警报信息 if(MotionPara.isEditor){ Debug.LogError(ErrorLocation.Locate("MAIN", "TIPS", MotionPara.mainRowNumber)); } } yield return null; }
//Tips表格信息提取 public bool TipsAdd(DataRow tips_row, string id) { bool isRight = true; TipsInfoManager tipsMana = new TipsInfoManager(); TipsMotion tipsExcel = tipsMana.TipsInfoGet(tips_row, id, ref isRight); if(!isRight){ return false; } _motionList.Add(tipsExcel); _hasTipsMotion = tipsExcel; simpleID.Add(simpleID.Count, id); return true; }