From 6baef62be11358eeb2d41e70c156522a41748780 Mon Sep 17 00:00:00 2001 From: Amaan Shawkath Date: Sat, 8 Jul 2023 21:32:46 +0100 Subject: [PATCH] Updated character sheet so it only displays when the dialogue has been completed --- Assets/Scripts/DialogueSystem/UI/DialoguePanel.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/DialogueSystem/UI/DialoguePanel.cs b/Assets/Scripts/DialogueSystem/UI/DialoguePanel.cs index 0642796..367283d 100644 --- a/Assets/Scripts/DialogueSystem/UI/DialoguePanel.cs +++ b/Assets/Scripts/DialogueSystem/UI/DialoguePanel.cs @@ -57,8 +57,17 @@ public class DialoguePanel : MonoBehaviour m_characterText.text = "Select an option..."; SetupCharacterSheet(); - m_characterSheet.SetName(characterData.name); - m_characterSheet.gameObject.SetActive(true); + + if (CharacterManager.Instance.CharacterInterviewed(characterData.name)) + { + m_characterSheet.SetName(characterData.name); + m_characterSheet.gameObject.SetActive(true); + + // Hide the dialogue panel. + gameObject.SetActive(false); + + return; + } m_questionIndexAsked.Clear(); m_questionHolder.gameObject.SetActive(true);