您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
33 行
729 B
33 行
729 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace HuaweiServiceDemo {
|
|
public class TestTip : MonoBehaviour {
|
|
public static TestTip Inst;
|
|
public Text text;
|
|
private bool dirty = false;
|
|
private string word = "";
|
|
public TestTip () {
|
|
Inst = this;
|
|
}
|
|
|
|
public void ShowText (string t) {
|
|
word += (t + "\n");
|
|
dirty = true;
|
|
}
|
|
|
|
public void Update () {
|
|
if (dirty) {
|
|
dirty = false;
|
|
text.text = word;
|
|
}
|
|
}
|
|
|
|
public void Clear () {
|
|
word = "";
|
|
dirty = true;
|
|
}
|
|
}
|
|
}
|