예제 #1
0
 private void Talk()
 {
     if (IsTheBeginningOfTheTalk ()) {
         npcTalkBox = (NPCTalkBox)GameObject.Instantiate (npcTalkBoxPrefab);
         npcTalkBox.transform.SetParent(GameObject.FindGameObjectWithTag("MainCanvas").transform, false);
         npcTalkBox.ShowTalkBox ();
     }
     if (IsTheEndingOfTheTalk ()) {
         GameObject.Destroy(npcTalkBox.gameObject);
         ResetIndex();
     } else {
         string message = npcTalksController.NpcTalks [npcId] [++index];
         npcTalkBox.SetMessage (message);
         npcTalkBox.InitTyper();
         //StartCoroutine("ActivateAlertMessage");
     }
 }
예제 #2
0
 private void Talk()
 {
     if (IsTheBeginningOfTheTalk())
     {
         npcTalkBox = (NPCTalkBox)GameObject.Instantiate(npcTalkBoxPrefab);
         npcTalkBox.transform.SetParent(GameObject.FindGameObjectWithTag("MainCanvas").transform, false);
         npcTalkBox.ShowTalkBox();
     }
     if (IsTheEndingOfTheTalk())
     {
         GameObject.Destroy(npcTalkBox.gameObject);
         ResetIndex();
     }
     else
     {
         string message = npcTalksController.NpcTalks [npcId] [++index];
         npcTalkBox.SetMessage(message);
         npcTalkBox.InitTyper();
         //StartCoroutine("ActivateAlertMessage");
     }
 }