private void Start() { chatMoov = transform.GetComponent <ChatMooving>(); if (chatMoov != null) { chatMoov.Next(); } audioSouce = GetComponent <AudioSource>(); }
//Jhonのチャットを作る public IEnumerator MakeJhonChat(string text) { Tmp_Jhon_chat = Instantiate(JhonPre, transform.position, Quaternion.identity, originObj); Tmp_Jhon_chat.transform.localPosition = JhonPos; Text _text = Tmp_Jhon_chat.transform.Find("Jhon_text").GetComponent <Text>(); _text.text = "";//初期化 int messageCount = 0; while (text.Length > messageCount) { _text.text += text[messageCount]; messageCount++; yield return(new WaitForSeconds(novelSpeed)); } //next処理 chatMoov.Next(); }
public void OnClick() { GameObject.Find("GameManager").GetComponent <GameManager>().AudioPlay(sound1); chatMoov.Next(); }