第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

寫字符串 10 秒

寫字符串 10 秒

C#
哈士奇WWW 2022-01-09 16:55:54
我正在嘗試一種實(shí)現(xiàn)自寫文本的方法,就像你通常在 2D 游戲中看到的那樣,但我發(fā)現(xiàn)自己陷入了懸崖,換句話說,我想我被卡住了在這種特殊情況下,什么是不錯(cuò)的谷歌搜索?private IEnumerator Narrative(string line, float seconds){    transform.GetChild(narratorPanel).GetComponent<CanvasGroup>().alpha = 1f; /* Begin narrative */        for (int i = 0; i < 10000; i++)        {            while (seconds >= 0)            {                seconds -= Time.smoothDeltaTime;            // ( seconds / line.Length ) = distance between each character in a timeframe            // By the end the entire line must be displayed and chances are it's going to disappear immediately after the last character so I'll also have to implement some kind of padding so that the user is able to read it            yield return null;            }        }    transform.GetChild(narratorPanel).GetComponent<CanvasGroup>().alpha = 0f; /* End narrative */}
查看完整描述

1 回答

?
守候你守候我

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超10個(gè)贊

您以這種方式實(shí)施您的想法是否有原因?考慮以下方法,看看它是否符合您想要實(shí)現(xiàn)的目標(biāo)。


IEnumerator WriteText(string Text,float interval)

{

    string dummyText = "";

    foreach(char s in Text)

    {

        dummyText += s;

        //write to the text object

        _TextObject.text = dummyText;

        yield return new WaitForSeconds(interval);


    }


查看完整回答
反對(duì) 回復(fù) 2022-01-09
  • 1 回答
  • 0 關(guān)注
  • 154 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)