Ejemplo n.º 1
0
    void SetLeftGo(string content)
    {
        goLeft.SetActive(true);
        goRight.SetActive(false);
        var    dataDefine = StaticData.configExcel.GetManorRegionWordsByDialogId(currDialogId);
        string NameText   = StaticData.configExcel.GetChapterFunctionTextByID(dataDefine.Name).SimplifiedChinese;

        if (dataDefine.Name == 10000007)
        {
            NameText = StaticData.playerInfoData.userInfo.Name;
        }
        NameText               = string.Format(NameText, StaticData.playerInfoData.userInfo.Name);
        TextLeftName.text      = NameText;
        imageLeftPerson.sprite = ABManager.GetAsset <Sprite>(dataDefine.HalfPhoto);
        TextContentLeft.word   = $"{content}";
        TextContentLeft.Play();
    }
Ejemplo n.º 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();
        };
    }
Ejemplo n.º 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();
    }