IEnumerator ActiveWindow() { while (true) { if (!TalkManager.Getinstance().TalkWindow.activeSelf) { shop.Window.SetActive(true); UIManager.Getinstance().Panel.SetActive(false); StopCoroutine("ActiveWindow"); } yield return(new WaitForSeconds(0.5f)); } }
public void ConversePlayer() { if (ConverseDistance > GetDistance()) { if (TalkManager.Getinstance().HaveTalk(npcID)) { Debug.Log(npcID); TalkManager.Getinstance().NPC_Name.text = Name; TalkManager.Getinstance().TalkToNPC(npcID); } StartCoroutine("ActiveWindow"); } else { shop.Window.SetActive(false); } }