unity实现剧情对话

时间:2023-03-10 02:09:20
unity实现剧情对话
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour
{ private string showText = "你好,欢迎来到奇幻大陆!";
private string text = string.Empty;
private float time = ;
private void OnGUI()
{
time += UnityEngine.Time.deltaTime;
if (time > 0.5)
{
time = ;
if (text.Length >= showText.Length)
{
text = string.Empty;
}
text = showText.Substring(, text.Length + );
}
GUI.Label(new Rect(, , , ), text);
}
}

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

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

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

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