private void ActivateDialogueWithVillager() { // 현재 대화 대상이 존재하며, 대화 중이 아닐 시, 'F' 키를 통해 대화 시도 if (Input.GetKeyDown(KeyCode.F) && !ui.inDialogue && currentVillager != null) { // m_Targets[0] ==> Player Chracter targetGroup.m_Targets[1].target = currentVillager.transform; movement.active = false; ui.InitiateDialogue(); currentVillager.TurnToPlayer(transform.position); } }
void Update() { if (Input.GetKeyDown(KeyCode.Space) && !ui.inDialogue && currentVillager != null) { targetGroup.m_Targets[1].target = currentVillager.transform; ui.SetCharNameAndColor(); ui.inDialogue = true; ui.CameraChange(true); ui.ClearText(); ui.FadeUI(true, .2f, .65f); currentVillager.TurnToPlayer(transform.position); } }