From 6baef62be11358eeb2d41e70c156522a41748780 Mon Sep 17 00:00:00 2001 From: Amaan Shawkath Date: Sat, 8 Jul 2023 21:32:46 +0100 Subject: [PATCH 1/2] 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); From bbcb6861c8a34ac24eb9a892a337e2d4eeebc528 Mon Sep 17 00:00:00 2001 From: Amaan Shawkath Date: Sat, 8 Jul 2023 21:33:03 +0100 Subject: [PATCH 2/2] Hiding dialogue once its finished --- Assets/Scripts/DialogueSystem/DialogueController.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/DialogueSystem/DialogueController.cs b/Assets/Scripts/DialogueSystem/DialogueController.cs index 66682ff..074d6c4 100644 --- a/Assets/Scripts/DialogueSystem/DialogueController.cs +++ b/Assets/Scripts/DialogueSystem/DialogueController.cs @@ -29,10 +29,9 @@ public class DialogueController : MonoBehaviour Debug.Log($"DialogueController: Character {characterName} finished interviewing"); CharacterManager.Instance.SetInterviewed(characterName); - PlayerController.Instance.cameraMovement = true; - // TODO: stop the dialogue and return to gameplay... - // TODO: we could probably show a "Quit" button highlighted. + + m_dialoguePanel.gameObject.SetActive(false); } public void Debug_NextCharacter()