/// <summary> /// Success /// </summary> protected virtual void Enter_Success() { m_ProduceingState = Produceing.Success; m_StartPlay = false; m_IsTimeOut = false; GameEntry.Sound.PlayUISound((int)UISoundId.End); int spliteTime = m_AnswerTime / m_TopicCale.Length; int score = 0; m_CalcStarNum = 0; for (int i = 0; i < m_TopicCale.Length; i++) { if (m_CurTime > (spliteTime * i)) { m_CalcStarNum++; } } // 初始的那颗星为6分,剩余4个每颗星 + 1分, score = 6 + (m_CalcStarNum - 1) * 1; m_StudentRoot.SetScore(m_DifficultyType, score); GameEntry.Sound.StopSound(TopicTouchBase.s_SoundSerialId); GameEntry.Sound.PlayUISound((int)UISoundId.Success); ///答题成功有分数和星星声音 m_Istingting = true; m_IsUpScore = true; }
/// <summary> /// BrushTopic /// </summary> protected virtual void Enter_BrushTopic() { m_ProduceingState = Produceing.BrushTopic; // 下一个学员 m_StudentRoot.NextStudent(); m_SelectTopic = RandomTopic(); m_SelectTopicSplit = m_SelectTopic.Split(';'); }
/// <summary> /// Playing /// </summary> protected virtual void Enter_Playing() { m_ProduceingState = Produceing.Playing; m_StartPlay = true; m_IsCanSpeekAgain = false; m_CurTime = m_AnswerTime; m_TopicCale.SetTime(m_AnswerTime, false); }
/// <summary> /// 进入教学 /// </summary> protected virtual void Enter_Teaching() { m_ProduceingState = Produceing.Teaching; if (m_Guide != null) { m_Guide.Open(); } }
/// <summary> /// 重置数据,open时候调用一次 /// </summary> protected virtual void ResetData() { m_ProduceingState = Produceing.None; m_SelectTopic = string.Empty; m_TopicCale.SetTime(m_AnswerTime, false); m_IsChooseSuccessCondition = false; m_IsChooseSuccessTarget = false; m_Istingting = true; }
/// <summary> /// WaitNext /// </summary> protected virtual void Enter_WaitNext() { m_ProduceingState = Produceing.WaitNext; m_CurTime = 0; m_TopicCale.Bigger(m_StudentRoot, m_CalcStarNum); //完成游戏之后的操作 //完成答题涨星星的叮叮声 StartCoroutine(IEnumeratorNext()); StartCoroutine(IEnumeratorUpScore()); }
/// <summary> /// Failed /// </summary> protected virtual void EnterFailed() { m_ProduceingState = Produceing.Failed; m_StartPlay = false; m_IsTimeOut = true; // 超时失败,不得分,0颗星 m_CalcStarNum = 0; m_StudentRoot.SetScore(m_DifficultyType, 0); GameEntry.Sound.StopSound(TopicTouchBase.s_SoundSerialId); GameEntry.Sound.PlayUISound((int)UISoundId.Failed); ///答题失败没有分数和星星声音 m_Istingting = false; m_IsUpScore = false; }
/// <summary> /// CountDown /// </summary> protected virtual void Enter_CountDown() { m_ProduceingState = Produceing.CountDown; }
/// <summary> /// 进入旁白 /// </summary> protected virtual void Enter_PennySay_Trouble() { m_ProduceingState = Produceing.PennySay; }
/// <summary> /// 进入旁白 /// </summary> protected virtual void Enter_PanBai() { m_ProduceingState = Produceing.PanBai; }