// 开启新教学 public void StartTeach(int teach_id) { isTeaching = true; isFinishedGroup = false; teachingID = teach_id; teachingStepIdx = 0; curTeachGroup = TeachGroupMgr.Instance.GetTeachGroup(teachingID); curTeachStep = CreateTeachStep(teachingStepID); curTeachStep.OnStart(); interruptTeachID = teachingID; interruptTeachStepID = teachingStepID; Debug.LogError("-------------StartTeach:" + teach_id); }
void NextTeachStep() { if (curTeachStep != null) { curTeachStep.OnOver(); } teachingStepIdx += 1; if (teachingStepIdx >= teachStepList.Count) { // Teach finished isTeaching = false; isFinishedGroup = true; finishedStates[teachingID] = true; interruptTeachID = -1; interruptTeachStepID = -1; finishedTeachID = teachingID; // Gate finished finishedStates[teachingID] = true; CustomPrefs.SetFinishedTeachID(teachingID); // TODO:by Teng.和服务器交互 Debuger.LogError(string.Format("Teach {0} finished!", teachingID)); if (IsLastTeachIdx(teachingID)) { isFinishedAll = true; } else { DetectNewTeach(); } } else { curTeachStep = CreateTeachStep(teachingStepID); curTeachStep.OnStart(); } }