unity實現劇情對話


using UnityEngine; 
using System.Collections; 
public class Test : MonoBehaviour 
{ 

    private string showText = "你好,歡迎來到奇幻大陸!"; 
    private string text = string.Empty; 
    private float time = 0; 
    private void OnGUI() 
    { 
        time += UnityEngine.Time.deltaTime; 
        if (time > 0.5) 
        { 
            time = 0; 
            if (text.Length >= showText.Length) 
            { 
                text = string.Empty; 
            } 
            text = showText.Substring(0, text.Length + 1); 
        } 
        GUI.Label(new Rect(0, 0, 200, 200), text); 
    } 
} 

 https://blog.csdn.net/qinyuanpei/article/details/48435063

一點思考http://www.ceeger.com/forum/read.php?tid=18229

工具介紹 https://blog.csdn.net/swordfishx82/article/details/45456613?utm_source=blogxgwz1

https://blog.csdn.net/u011926026/article/details/63683227?locationNum=11&fps=1


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM