Exemple #1
0
    private bool InitVoice()
    {
#if USING_GCLOUDVOICE && UNITY_EDITOR
        m_gcloudVoiceMan = new Gcloud_VoiceMan();
        bool ret = m_gcloudVoiceMan.Init();

        if (ret)
        {
            m_OffLineVoice = new Gcloud_OffLineVoice(this, VoiceMode.OffLine);

            m_RealTimeVoiceNational = new Gcloud_RealTimeVoiceNational(this, VoiceMode.RealTimeVoiceNational);

            m_RealTimeVoiceTeam = new Gcloud_RealTimeVoiceTeam(this, VoiceMode.RealTimeVoiceTeam);

            m_TranslationVoice = new Gcloud_TranslationVoice(this, VoiceMode.Translation);
        }
        return(ret);
#elif USING_LGVC
        m_lgvcVoiceMan = new GameObject("LGVC_VoiceMan").AddComponent <LGVC.LGVC_VoiceMan>();
        bool ret = m_lgvcVoiceMan.Init();

        if (ret)
        {
            m_OffLineVoice = new LGVC.LGVC_OffLineVoice(this, VoiceMode.OffLine);
        }

        return(ret);
#else
        return(false);
#endif
    }
Exemple #2
0
        public void Stop()
        {
            if (IsStarted)
            {
                LGVC_VoiceMan engine = _Manager.LGVC_VoiceMan;

                engine.Storage.UploadFileEvent   -= OnUploadReccordFileComplete;
                engine.Storage.DownloadFileEvent -= OnDownloadRecordFileComplete;
                engine.OnPlayRecordFileComplete  -= PlayRecordFileComplete;

                IsStarted = false;
            }
        }
Exemple #3
0
        public bool Start()
        {
            if (!IsStarted)
            {
                LGVC_VoiceMan engine = _Manager.LGVC_VoiceMan;

                engine.Storage.UploadFileEvent   += OnUploadReccordFileComplete;
                engine.Storage.DownloadFileEvent += OnDownloadRecordFileComplete;
                engine.OnPlayRecordFileComplete  += PlayRecordFileComplete;

                OnApplyMessageKeyComplete(0);

                IsStarted = true;
            }

            return(IsStarted);
        }