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