Пример #1
0
        /// <summary>
        /// アニバーサリーセンテンスをセットする。
        /// </summary>
        /// <param name="topic"></param>
        public void SetAnniversarySentence(MsgTopic topic)
        {
            //データ取得
            ResWhatDayIsToday DataList = LiplisStatus.Instance.InfoAnniversary.DataList;

            if (DataList == null)
            {
                return;
            }

            int sentenceIdx  = 0;
            int AllocationId = 0;

            foreach (var data in DataList.AnniversaryDaysList)
            {
                foreach (MsgSentence talkSentence in data.TalkSentenceList)
                {
                    MsgSentence sentence = talkSentence.Clone();

                    //キャラデータ取得
                    LiplisModel cahrData = LiplisModels.Instance.TableModelId[AllocationId];

                    if (sentenceIdx == 0)
                    {
                        sentence.BaseSentence = "今日は" + sentence.BaseSentence + "みたいです~♪";
                        sentence.ToneConvert();
                        //sentence.TalkSentence = sentence.BaseSentence;
                    }
                    else
                    {
                        sentence.ToneConvert();
                    }

                    //アロケーションID設定
                    sentence.AllocationId = AllocationId;

                    //インデックスインクリメント
                    sentenceIdx++;
                    AllocationId++;

                    //アロケーションIDコントロール
                    if (AllocationId > LiplisModels.Instance.GetMaxAllocationId())
                    {
                        AllocationId = 0;
                    }

                    //センテンスを追加
                    topic.TalkSentenceList.Add(sentence);
                }
            }
        }
Пример #2
0
    private void SetNextSentence(MsgSentence sentence)
    {
        //トーンコンバート
        sentence.ToneConvert();

        //ウインドウを表示する
        if (!sentence.FlgAddMessge)
        {
            if (sentence.TalkSentence != null)
            {
                CreateWindow(sentence.TalkSentence, sentence.AllocationId);
            }
        }
        else
        {
            this.NowTalkWindow.AddText(sentence.TalkSentence);
        }

        //音声再生
        VoiceTalk(sentence);

        //表情設定
        StartCoroutine(modelController.SetExpression(sentence));

        //おしゃべりの開始
        modelController.StartTalking(sentence);

        //センテンスカウントインクリメント
        NowSentenceCount++;
    }
Пример #3
0
        /// <summary>
        /// センテンスを生成する
        /// </summary>
        /// <param name="message"></param>
        /// <param name="wetherCode"></param>
        /// <param name="addMessage"></param>
        /// <returns></returns>
        private static MsgSentence CreateWetherSentence(string message, string wetherCode, bool addMessage, LiplisTone Tone, int AllocationId)
        {
            //エモーションをセットする
            MsgEmotion emotion = GetWetherEmotion(wetherCode);

            //インスタンス生成
            MsgSentence sentence = new MsgSentence(Tone, message, message, emotion.EMOTION, emotion.POINT, false, AllocationId, addMessage);

            //トーンコンバート
            sentence.ToneConvert();

            //生成したセンテンスを返す
            return(sentence);
        }
Пример #4
0
    public IEnumerator SetVoiceData(MsgTopic NowLoadTopic, MsgSentence sentence)
    {
        //トーンコンバート
        sentence.ToneConvert();

        //var Async = ClalisForLiplisGetVoiceMp3.GetAudioClip(NowLoadTopic, sentence.AllocationId, sentence.SubId);
        var Async = ClalisForLiplisGetVoiceMp3Ondemand.GetAudioClip(sentence, modelController.GetModelCount());

        //非同期実行
        yield return(Async);

        //データ取得
        sentence.VoiceData = (AudioClip)Async.Current;
    }