Пример #1
0
    public void Continue()
    {
        Time.timeScale = 1f;
        switch (m_IntradaStatus)
        {
        case IntradaStatus.WaitForPlaying:
        case IntradaStatus.Playing:
            GameRecover();
            break;

        case IntradaStatus.Played:
            if (HasIntrada == false)
            {
                CorePlayIntrada intrada = new CorePlayIntrada(CorePlayData.BMPDelta, GameRecover);
                HasIntrada = true;
                intrada.Show();
            }
            break;
        }

        if (Tutorial != null)
        {
            Tutorial.Pause = false;
        }
    }
Пример #2
0
    private void ProcessEvents(CorePlayTimerEvent te)
    {
        switch (te.m_Type)
        {
        case CorePlayTimerEvent.EventType.CreateTapSentence:
            //Debug.Log("CreateTapSentence = " + te.m_Timer + " / time = " + Time.time);
            m_TapCreator.CreateWords(CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex], te.m_SentenceIndex);
            break;

        case CorePlayTimerEvent.EventType.CreateVoiceSentence:
            m_VoiceCreator.CreateWords(CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex], te.m_SentenceIndex);
            //Debug.Log(" 0 = 普通模式 开始录音" + "  / " + Time.frameCount);
            StartMicRecord();
            break;

        case CorePlayTimerEvent.EventType.EndVoiceChecker:
            Debug.Log(" 1 = 普通模式 结束录音");
            StopMicRecord();
            break;

        case CorePlayTimerEvent.EventType.EndVoiceUI:
            m_VoiceCreator.BGFadeOut();
            if (m_StartAutoPlay)
            {
                m_AutoPlay.Show();
            }
            break;

        case CorePlayTimerEvent.EventType.HighLightTap:
            string word = CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex].ClickAndHOList.HitObjects[te.m_HOIndex].Word.ToLower();
            m_TapCreator.HighLightWord(CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex].ClickAndHOList.HitObjects, te.m_HOIndex, te.m_HighLightTime);
            m_InputCheck.SetCurHOIndex(te.m_SentenceIndex, te.m_HOIndex);
            if (m_StartAutoPlay)
            {
                ClickObj co = CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex].ClickAndHOList.ClickObjs[te.m_HOIndex];
                m_AutoPlay.Simulate(CorePlaySettings.Instance.m_PreShowTimeLength * RuntimeConst.MSToSecond, co.m_Position);
            }
            StartCoroutine(HOPointTimeLogic(CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex].ClickAndHOList.HitObjects[te.m_HOIndex]));
            break;

        case CorePlayTimerEvent.EventType.HighLightVoice:
            m_VoiceCreator.HighLightWord(CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex].ClickAndHOList.HitObjects, te.m_HOIndex);
            break;

        case CorePlayTimerEvent.EventType.StartCount:
            CorePlayIntrada intrada = new CorePlayIntrada(CorePlayData.BMPDelta, () => { m_IntradaStatus = IntradaStatus.Played; });
            intrada.Show();
            m_IntradaStatus = IntradaStatus.Playing;
            break;

        case CorePlayTimerEvent.EventType.StartPlayMusic:
            StartCurrentSong();
            break;

        case CorePlayTimerEvent.EventType.StartTapChecker:
            // Temp Event
            CorePlaySceneManager.checkSentenceEvent.Invoke();
            int sentenceLength = CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex].m_InOutTime.EndTime -
                                 CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex].m_InOutTime.StartTime;
            int timeLength = sentenceLength +
                             CorePlaySettings.Instance.m_PreShowTimeLength;
            m_InputCheck.CreateCheckSentenceWithMS(CorePlayData.CurrentSong.SentenceObjs[te.m_SentenceIndex].ClickAndHOList.HitObjects, te.m_SentenceIndex, sentenceLength);
            float duration = timeLength * 0.001f;
            StartCoroutine(SentenceCheck(te.m_SentenceIndex, duration));
            break;

        case CorePlayTimerEvent.EventType.StartVoiceChecker:
            CreateVoiceCheck(te.m_SentenceIndex);
            break;

        case CorePlayTimerEvent.EventType.StartVoiceUI:
            m_VoiceCreator.BGFadeIn();
            if (m_StartAutoPlay)
            {
                m_AutoPlay.Close();
            }
            break;

        case CorePlayTimerEvent.EventType.StartBoss:
            StartBossWarLogic();
            break;

        case CorePlayTimerEvent.EventType.StartKeyVoice:
            StartKeyAndVoice();
            break;
        }
    }