basic setup of a character sheet - needs some more work

Wiring up character interviewed
Added property for bulletized text - ready to add when we have some
This commit is contained in:
Amaan Shawkath
2023-07-08 17:08:45 +01:00
committed by Minzkraut
parent 430118d0f8
commit ba34c89c8b
6 changed files with 490 additions and 4 deletions

View File

@@ -1,19 +1,31 @@
using System;
using System.Collections.Generic;
using UnityEngine;
public class DialogueController : MonoBehaviour
{
[SerializeField] private DialoguePanel m_dialoguePanel;
[SerializeField] private List<CharacterData> m_characterDatas;
// DEBUG - Will need replacing with the character you selected.
private void Start()
{
DisplayCharacterText(m_characterDatas[0]);
DisplayCharacterText(CharacterManager.Instance.CharacterDatas[0]);
m_dialoguePanel.OnQuestionsFinished += OnQuestionsFinished;
}
public void DisplayCharacterText(CharacterData character)
{
m_dialoguePanel.Setup(character);
}
public void OnQuestionsFinished(string characterName)
{
Debug.Log($"DialogueController: Character {characterName} finished interviewing");
CharacterManager.Instance.SetInterviewed(characterName);
// TODO: stop the dialogue and return to gameplay...
// TODO: we could probably show a "Quit" button highlighted.
}
}