예제 #1
0
    private void OnButtonDialogClick()
    {
        int pos = StaticData.configExcel.GetManorRegionWordsByDialogId(currDialogId).Pos;

        if (!isCurrEnd)//这句话没结束加速
        {
            if (pos == 1)
            {
                TextContentLeft.Speed6Play();
            }
            else if (pos == 2)
            {
                TextContentRight.Speed6Play();
            }
        }
        else//这句话结束了,播放下一句
        {
            TextContentLeft.ResetSpeedPlay();
            TextContentRight.ResetSpeedPlay();
            var wordDefine = StaticData.configExcel.GetManorRegionWordsByDialogId(currDialogId);
            if (wordDefine.isEnd)//对话段结束
            {
                EndDilog();
            }
            else//播放下一句
            {
                currDialogId = wordDefine.NextDialogId;
                PlayDialog();
            }
        }
    }
예제 #2
0
    //车内回答
    async void ShowCarMoveBGAnswer()
    {//男主回答
        ChapterHelper.SetActive(nanDialogue.gameObject, true);
        //带头像男主说话
        name_nan.text = ChapterTool.GetChapterFunctionString(10000002);
        var data = ChapterTool.GetChapterData(10000029);

        dialogueText_nan.word = ChapterTool.GetDialogueString(data);
        dialogueText_nan.Play();
        dialogueText_nan.Speed6Play();

        await UniTask.Delay(2700);

        ChapterHelper.SetActive(nanDialogue.gameObject, false);

        WallLoop wallLoop = carMoveBG.transform.Find("MoveBg").GetComponent <WallLoop>();

        wallLoop.callback = () =>
        {
            ClickBtn();
        };
    }
예제 #3
0
    //显示车外live2D动画
    async UniTask ShowCarMoveBG(CancellationTokenSource cancellationTokenSource)
    {
        ChapterHelper.SetActive(carMoveBG.gameObject, true);

        await UniTask.Delay(500);

        //带头像女主说话
        var data = ChapterTool.GetChapterData(10000028);

        ChapterHelper.SetActive(nvDialogue.gameObject, true);
        name_nv.text         = StaticData.playerInfoData.userInfo.Name;
        dialogueText_nv.word = ChapterTool.GetDialogueString(data);
        dialogueText_nv.Play();
        dialogueText_nv.Speed6Play();
        dialogueText_nv.onAnimationEnd.AddListener(() => { OpenClickBtn(true); });
        await UniTask.Delay(TimeSpan.FromMilliseconds(2700), cancellationToken : cancellationTokenSource.Token);

        OpenClickBtn(false);//玩家如果没点击先关闭按钮
        ChapterHelper.SetActive(nvDialogue.gameObject, false);
        _clickIndex++;
        ShowCarMoveBGAnswer();
    }