diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-08-24 00:14:06 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-08-24 00:14:06 -0400 |
| commit | 581eb102d540bc495ec62dae25fcea0d676d1a59 (patch) | |
| tree | 898078c2580819b953ad7696779269827667e853 /Assets/Scripts/Dialogue | |
| parent | 4c192cebf7af6c271b8a8a9b10616c85ab2856dd (diff) | |
| download | Project-Sandbox-581eb102d540bc495ec62dae25fcea0d676d1a59.tar.gz Project-Sandbox-581eb102d540bc495ec62dae25fcea0d676d1a59.tar.bz2 Project-Sandbox-581eb102d540bc495ec62dae25fcea0d676d1a59.zip | |
Dialogue; Unlock cursor
Diffstat (limited to 'Assets/Scripts/Dialogue')
| -rw-r--r-- | Assets/Scripts/Dialogue/Dialogue.cs | 12 | ||||
| -rw-r--r-- | Assets/Scripts/Dialogue/Dialogue.cs.meta | 11 | ||||
| -rw-r--r-- | Assets/Scripts/Dialogue/DialogueManager.cs | 21 | ||||
| -rw-r--r-- | Assets/Scripts/Dialogue/DialogueManager.cs.meta | 11 | ||||
| -rw-r--r-- | Assets/Scripts/Dialogue/DialogueTrigger.cs | 13 | ||||
| -rw-r--r-- | Assets/Scripts/Dialogue/DialogueTrigger.cs.meta | 11 |
6 files changed, 79 insertions, 0 deletions
diff --git a/Assets/Scripts/Dialogue/Dialogue.cs b/Assets/Scripts/Dialogue/Dialogue.cs new file mode 100644 index 0000000..bf2c960 --- /dev/null +++ b/Assets/Scripts/Dialogue/Dialogue.cs @@ -0,0 +1,12 @@ +using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+[System.Serializable]
+public class Dialogue
+{
+ public string name;
+
+ [TextArea(3, 10)]
+ public string[] sentences;
+}
diff --git a/Assets/Scripts/Dialogue/Dialogue.cs.meta b/Assets/Scripts/Dialogue/Dialogue.cs.meta new file mode 100644 index 0000000..06fe34a --- /dev/null +++ b/Assets/Scripts/Dialogue/Dialogue.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c51f13272531bf313b4525ab297ca9b8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Dialogue/DialogueManager.cs b/Assets/Scripts/Dialogue/DialogueManager.cs new file mode 100644 index 0000000..056e7d9 --- /dev/null +++ b/Assets/Scripts/Dialogue/DialogueManager.cs @@ -0,0 +1,21 @@ +using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class DialogueManager : MonoBehaviour
+{
+
+ private Queue<string> sentences;
+
+ // Start is called before the first frame update
+ void Start()
+ {
+ sentences = new Queue<string>();
+ }
+
+ public void StartDialogue(Dialogue dialogue)
+ {
+ Debug.Log("Starting conversation with " + dialogue.name);
+ }
+
+}
diff --git a/Assets/Scripts/Dialogue/DialogueManager.cs.meta b/Assets/Scripts/Dialogue/DialogueManager.cs.meta new file mode 100644 index 0000000..c4089d4 --- /dev/null +++ b/Assets/Scripts/Dialogue/DialogueManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0c8e9050d46a64b3a833517e2db4a78b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Dialogue/DialogueTrigger.cs b/Assets/Scripts/Dialogue/DialogueTrigger.cs new file mode 100644 index 0000000..3ca0ae1 --- /dev/null +++ b/Assets/Scripts/Dialogue/DialogueTrigger.cs @@ -0,0 +1,13 @@ +using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class DialogueTrigger : MonoBehaviour
+{
+ public Dialogue dialogue;
+
+ public void TriggerDialogue()
+ {
+ FindObjectOfType<DialogueManager>().StartDialogue(dialogue);
+ }
+}
diff --git a/Assets/Scripts/Dialogue/DialogueTrigger.cs.meta b/Assets/Scripts/Dialogue/DialogueTrigger.cs.meta new file mode 100644 index 0000000..3d54ac1 --- /dev/null +++ b/Assets/Scripts/Dialogue/DialogueTrigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e5575ce16db5683b796e3a9db6a8a0e1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: |
