From e55f5ff18f8e3dda5705eadb4940db8ddb9e2928 Mon Sep 17 00:00:00 2001 From: Amaan Shawkath Date: Sat, 8 Jul 2023 13:26:56 +0100 Subject: [PATCH] initial setup of character data and dialogue holder --- Assets/Scripts.meta | 8 +++++++ Assets/Scripts/DialogueSystem.meta | 8 +++++++ .../Scripts/DialogueSystem/CharacterData.cs | 17 +++++++++++++++ .../DialogueSystem/CharacterData.cs.meta | 11 ++++++++++ Assets/Scripts/DialogueSystem/Dialogue.cs | 21 +++++++++++++++++++ .../Scripts/DialogueSystem/Dialogue.cs.meta | 11 ++++++++++ .../DialogueSystem/DialogueController.cs | 12 +++++++++++ .../DialogueSystem/DialogueController.cs.meta | 11 ++++++++++ 8 files changed, 99 insertions(+) create mode 100644 Assets/Scripts.meta create mode 100644 Assets/Scripts/DialogueSystem.meta create mode 100644 Assets/Scripts/DialogueSystem/CharacterData.cs create mode 100644 Assets/Scripts/DialogueSystem/CharacterData.cs.meta create mode 100644 Assets/Scripts/DialogueSystem/Dialogue.cs create mode 100644 Assets/Scripts/DialogueSystem/Dialogue.cs.meta create mode 100644 Assets/Scripts/DialogueSystem/DialogueController.cs create mode 100644 Assets/Scripts/DialogueSystem/DialogueController.cs.meta diff --git a/Assets/Scripts.meta b/Assets/Scripts.meta new file mode 100644 index 0000000..d055cb8 --- /dev/null +++ b/Assets/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aae68c510effd74478cbde0435e11b18 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/DialogueSystem.meta b/Assets/Scripts/DialogueSystem.meta new file mode 100644 index 0000000..baed040 --- /dev/null +++ b/Assets/Scripts/DialogueSystem.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 45139bbcbac1e2c4c86ff7094d67808e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/DialogueSystem/CharacterData.cs b/Assets/Scripts/DialogueSystem/CharacterData.cs new file mode 100644 index 0000000..c366c87 --- /dev/null +++ b/Assets/Scripts/DialogueSystem/CharacterData.cs @@ -0,0 +1,17 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[CreateAssetMenu(fileName = "CharacterData", menuName = "Characters/Generate Character Data", order = 1)] +public class CharacterData : ScriptableObject +{ + public string m_name; + + public int m_charisma; + public int m_strength; + public int m_dexterity; + public int m_intelligence; + + // Note - the index of the dialogue will control what question it is linked too. + public List m_dialogueOptions; +} diff --git a/Assets/Scripts/DialogueSystem/CharacterData.cs.meta b/Assets/Scripts/DialogueSystem/CharacterData.cs.meta new file mode 100644 index 0000000..813059c --- /dev/null +++ b/Assets/Scripts/DialogueSystem/CharacterData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ddda90cbbcf3ea54e9105c3a5f0ac9a5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/DialogueSystem/Dialogue.cs b/Assets/Scripts/DialogueSystem/Dialogue.cs new file mode 100644 index 0000000..f466b53 --- /dev/null +++ b/Assets/Scripts/DialogueSystem/Dialogue.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[System.Serializable] +public class Dialogue +{ + [SerializeField] private string m_dialogueText; +} + +public class QuestionData +{ + public string[] m_questions = new string[] + { + "Who are you?", + "Tell me something about yourself.", + "What is your greatest accomplishment?", + "Where do you see yourself in five years?", + "What are your salary requirements?" + }; +} diff --git a/Assets/Scripts/DialogueSystem/Dialogue.cs.meta b/Assets/Scripts/DialogueSystem/Dialogue.cs.meta new file mode 100644 index 0000000..289a881 --- /dev/null +++ b/Assets/Scripts/DialogueSystem/Dialogue.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d9ec0a6e2647c134ca75553cf8197bfe +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/DialogueSystem/DialogueController.cs b/Assets/Scripts/DialogueSystem/DialogueController.cs new file mode 100644 index 0000000..95fbc00 --- /dev/null +++ b/Assets/Scripts/DialogueSystem/DialogueController.cs @@ -0,0 +1,12 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class DialogueController : MonoBehaviour +{ + // TODO: + // - Load the correct character based on the character who has been interacted with + // - Display the 5 question options and hook up their responses + // - Fill out a character sheet as you go along + // - Update the visual with the text +} diff --git a/Assets/Scripts/DialogueSystem/DialogueController.cs.meta b/Assets/Scripts/DialogueSystem/DialogueController.cs.meta new file mode 100644 index 0000000..6656465 --- /dev/null +++ b/Assets/Scripts/DialogueSystem/DialogueController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f2e7a099c6d0e484ba52b864ad6253c2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: