public void SetConversation() { DataManager.IsConversationAndCutScene = true; lastConversation = NPC.GetCurrentConversation_ID(); if (!string.IsNullOrEmpty(NPC.GetNext_Conversation_ID()) && // 다음 대화가 존재할 때 CheckCondition(NPC.GetCondition_ID())) // 대화 조건이 성립했을 때 { if (NPC.GetType() == 'C') { select = false; // Conversation 게임 오브젝트 생성, 대화문 넣기 Options.SetActive(false); Conversation.SetActive(true); // 대화문 넣기 Conversation.SetName(NPC.Name); StartCoroutine(Conversation.SetContent(NPC.GetContent(), NPC.Waitfor(), NPC.LoadConversation, NPC.GetNext_Conversation_ID())); exit = NPC.GetExit(); // 나갈 수 있다. dungeon_id = NPC.GetDunGeon_ID(); // 전투가 진행될 수 있다. } else if (NPC.GetType() == 'O') { // Options 게임 오브젝트 생성, 선택지 넣기 Options.SetActive(true); Conversation.SetActive(false); Options.ClearOptions(); // 대화문 넣기 Options.SetName(NPC.Name); StartCoroutine(Options.SetContent(NPC.GetContent(), NPC.Waitfor(), SubMethod, NPC.GetOptions())); } } else { select = false; NPC.LoadConversation(lastConversation); // Conversation 게임 오브젝트 생성, 대화문 넣기 Options.SetActive(false); Conversation.SetActive(true); // 대화문 넣기 Conversation.SetName(NPC.Name); StartCoroutine(Conversation.SetContent <string>(NPC.GetContent(), NPC.Waitfor())); exit = NPC.GetExit(); // 나갈 수 있다. dungeon_id = NPC.GetDunGeon_ID(); // 전투가 진행될 수 있다. } }