public void SetUp() { string path = "Texts/script1"; Debug.Log("处理的脚本为" + path); allStr = TalkShow.GetScriptInRow(path); roleNameList = new List <string>() { "Phree", "Soda", "Boss" }; roleAniDic.Add("Phree", new string[] { "普通", "微笑", "悲伤", "生气", "鄙夷", "张嘴", "死目" }); roleAniDic.Add("Soda", new string[] { "普通", "悲伤", "生气", "微笑", "无语", "打哈欠" }); roleAniDic.Add("Boss", new string[] { "普通", "悲伤", "生气", "开口笑", "眯眼笑", "阴险笑" }); }
public void DoAct() { TalkShow talkShow = TalkShow.instance; talkShow.nameText.text = "【" + name + "】"; Debug.Log(text); talkShow.PlayText(text); foreach (GameObject obj in talkShow.headAniList) { FaceAni faceani = obj.GetComponent <FaceAni>(); try { if (faceani.NameId == name) { faceani.PlayTalk(); } }catch (Exception e) { Debug.Log("获取人物动画组件失败,请检查脚本文件是否正确"); Debug.Log(e); } } }
// Start is called before the first frame update void Start() { talkShow = GameObject.Find("Canvas").transform.GetComponent <TalkShow>(); optionText = gameObject.GetComponentsInChildren <Text>(); }
// Start is called before the first frame update void Start() { talkShow = TalkShow.instance; }
// Start is called before the first frame update public BranchManager() { rowIndex = 0; talkShow = TalkShow.instance; isInBranch = true; }
private void Awake() { instance = this; }