]> git.lizzy.rs Git - SuperMouseAdventure.git/commitdiff
Dialogue-System v0.5
authorKG0104 <konstantin.gerlach@kabelmail.de>
Sat, 4 Sep 2021 13:23:51 +0000 (15:23 +0200)
committerKG0104 <konstantin.gerlach@kabelmail.de>
Sat, 4 Sep 2021 13:23:51 +0000 (15:23 +0200)
2DGame/Assets/Scenes/(1) Green_Idyll/green_idyll_1.unity
2DGame/Assets/Scripts/Audio/AudioManager.cs
2DGame/Assets/Scripts/Dialogue/BossSpeechBubble.cs [new file with mode: 0644]
2DGame/Assets/Scripts/Dialogue/BossSpeechBubble.cs.meta [new file with mode: 0644]
2DGame/Assets/Scripts/Dialogue/Dialogue.cs
2DGame/Assets/Scripts/Dialogue/SpeechBubble.cs
2DGame/Assets/Scripts/Dialogue/SpeechBubble.cs.meta
2DGame/ProjectSettings/EditorBuildSettings.asset
2DGame/UserSettings/EditorUserSettings.asset

index 7b53b514d1d4d49e119671cbf398f963e543ab59..3387dc7d7954a3ea8701f46eaa36e423965f9ccc 100644 (file)
@@ -2576,6 +2576,11 @@ MonoBehaviour:
     volume: 0.2
     pitch: 1
     source: {fileID: 0}
+  - name: click
+    clip: {fileID: 8300000, guid: a466bc92929244521a62704f97c915bc, type: 3}
+    volume: 0.2
+    pitch: 1
+    source: {fileID: 0}
 --- !u!4 &292106544
 Transform:
   m_ObjectHideFlags: 0
@@ -5200,7 +5205,7 @@ MonoBehaviour:
   m_GameObject: {fileID: 631343912}
   m_Enabled: 1
   m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: aec751965eb08894180422494fd03a80, type: 3}
+  m_Script: {fileID: 11500000, guid: 5c29d09f2b5174b07812a2ca95ed3316, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
   dialogueManager: {fileID: 2036393123}
@@ -11034,7 +11039,7 @@ GameObject:
   m_Component:
   - component: {fileID: 791090330}
   m_Layer: 0
-  m_Name: bubblePos (1)
+  m_Name: bubblePos_mouse
   m_TagString: Untagged
   m_Icon: {fileID: -1412012063857583412, guid: 0000000000000000d000000000000000, type: 0}
   m_NavMeshLayer: 0
@@ -30233,7 +30238,7 @@ GameObject:
   - component: {fileID: 1343376135}
   - component: {fileID: 1343376136}
   m_Layer: 0
-  m_Name: prof_tutori
+  m_Name: prof_erclaire
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
index 42526b301d3db8d7fad8bc674da3edcbcb367305..9b406716bfe808c4cb9340df2ab4896b9c251d35 100644 (file)
@@ -5,7 +5,6 @@ using UnityEngine;
 public class AudioManager : MonoBehaviour
 {
     public Sound[] sounds;
-    public AudioSource currentSource;
     public static AudioManager instance;
 
     void Awake()
@@ -35,7 +34,6 @@ public class AudioManager : MonoBehaviour
     public void Play(string name)
     {
         Sound s = Array.Find(sounds, sound => sound.name == name);
-        currentSource = s.source;
-        currentSource.Play();
+        s.source.Play();
     }
 }
\ No newline at end of file
diff --git a/2DGame/Assets/Scripts/Dialogue/BossSpeechBubble.cs b/2DGame/Assets/Scripts/Dialogue/BossSpeechBubble.cs
new file mode 100644 (file)
index 0000000..04eaa89
--- /dev/null
@@ -0,0 +1,23 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class BossSpeechBubble : MonoBehaviour
+{
+    [SerializeField]
+    GameObject dialogueManager;
+
+    BossDialogue dialogue;
+
+    public Transform[] speakers;
+
+    void Start()
+    {
+        dialogue = dialogueManager.GetComponent<BossDialogue>();
+    }
+
+    public void NextSpeaker()
+    {
+        transform.position = speakers[dialogue.index].position;
+    }
+}
\ No newline at end of file
diff --git a/2DGame/Assets/Scripts/Dialogue/BossSpeechBubble.cs.meta b/2DGame/Assets/Scripts/Dialogue/BossSpeechBubble.cs.meta
new file mode 100644 (file)
index 0000000..4aa4c44
--- /dev/null
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: aec751965eb08894180422494fd03a80
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
index 68fa6f6120e540d81bcd8cde3dc88b9d3eabbedc..b0134199d9fe28c4144cfc868a70ed8d38d0a57e 100644 (file)
@@ -67,6 +67,7 @@ public class Dialogue : MonoBehaviour
             dialogueBox.SetActive(false);
             SpeechBubble.SetActive(false);
             mouse.GetComponent<Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezeRotation;
+            mouse.GetComponent<MouseController>().enabled = true;
         }
     }
-}
+}
\ No newline at end of file
index 7df10f749d0fe47acf3b6466951ec7f245b7a665..4e31d8ac3f8e16ad8565f7992844f4986525a491 100644 (file)
@@ -7,17 +7,17 @@ public class SpeechBubble : MonoBehaviour
     [SerializeField]
     GameObject dialogueManager;
 
-    BossDialogue dialogue;
+    Dialogue dialogue;
 
     public Transform[] speakers;
 
     void Start()
     {
-        dialogue = dialogueManager.GetComponent<BossDialogue>();
+        dialogue = dialogueManager.GetComponent<Dialogue>();
     }
 
     public void NextSpeaker()
     {
         transform.position = speakers[dialogue.index].position;
     }
-}
\ No newline at end of file
+}
index 4aa4c4405e9d55fbe776387767e15c20b96c6bfd..b1c8d7a806f851a2b3c333b00b2b29ca0c4159bd 100644 (file)
@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: aec751965eb08894180422494fd03a80
+guid: 5c29d09f2b5174b07812a2ca95ed3316
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2
index 5d5d3322a97703610f6b359c03fd11fc16709f75..00518b9a942ba72f551e613301198eab18570ef9 100644 (file)
@@ -14,28 +14,28 @@ EditorBuildSettings:
   - enabled: 1
     path: Assets/Scenes/(1) Green_Idyll/green_idyll_1.unity
     guid: 2da5e8daf6d56594db892335cf0ea295
-  - enabled: 1
+  - enabled: 0
     path: Assets/Scenes/(1) Green_Idyll/green_idyll_2.unity
     guid: 5d0b78bc83068114c990b76581dfe90e
-  - enabled: 1
+  - enabled: 0
     path: Assets/Scenes/(1) Green_Idyll/green_idyll_3.unity
     guid: a669f50e706593f4896f10da8face891
-  - enabled: 1
+  - enabled: 0
     path: Assets/Scenes/(1) Green_Idyll/green_idyll_4.unity
     guid: 8e42d3756fba33c43980668de7e0be78
-  - enabled: 1
+  - enabled: 0
     path: Assets/Scenes/(1) Green_Idyll/green_idyll_5.unity
     guid: 50af261cf3d38864c9ec0a733c1acdfb
-  - enabled: 1
+  - enabled: 0
     path: Assets/Scenes/(1) Green_Idyll/green_idyll_6.unity
     guid: cbbcf74f0d48e2040a692104a8032dd5
-  - enabled: 1
+  - enabled: 0
     path: Assets/Scenes/(1) Green_Idyll/green_idyll_7.unity
     guid: d99457d5af858544fa06a0660ec9a835
-  - enabled: 1
+  - enabled: 0
     path: Assets/Scenes/(1) Green_Idyll/green_idyll_8.unity
     guid: d694c4b197cebcb4fb93c625c83439da
-  - enabled: 1
+  - enabled: 0
     path: Assets/Scenes/(1) Green_Idyll/green_idyll_9.unity
     guid: 8dd8491a5735db94b80db0253f473bd2
   - enabled: 1
index d84c05a35a9a285ba313155660ccb178cfed0ef2..222ea1c7c1c824b5784904162b710ba77ef923da 100644 (file)
@@ -21,19 +21,19 @@ EditorUserSettings:
       value: 22424703114646680e0b0227036c17415f573f38292d280f042d043feeaf332ae7e238d6ee3e2630353db7721130082beb
       flags: 0
     RecentlyUsedScenePath-5:
-      value: 22424703114646680e0b0227036c5315001214153f2d2a352e3d143cecae2136ebf32f
+      value: 22424703114646680e0b0227036c17415f573f38292d280f042d043feeaf332ae7e238d6ee3e2630353dbe6c4a2b0f36e613
       flags: 0
     RecentlyUsedScenePath-6:
-      value: 22424703114646680e0b0227036c5315001214152926227e38271427fb
+      value: 22424703114646680e0b0227036c5315001214153f2d2a352e3d143cecae2136ebf32f
       flags: 0
     RecentlyUsedScenePath-7:
-      value: 22424703114646680e0b0227036c6c0417050c192f3a23352367083debf42d
+      value: 22424703114646680e0b0227036c5315001214152926227e38271427fb
       flags: 0
     RecentlyUsedScenePath-8:
-      value: 22424703114646680e0b0227036c17415f573f38292d280f042d043feeaf332ae7e238d6ee3e2630353dbe721130082beb
+      value: 22424703114646680e0b0227036c6c0417050c192f3a23352367083debf42d
       flags: 0
     RecentlyUsedScenePath-9:
-      value: 22424703114646680e0b0227036c17415f573f38292d280f042d043feeaf332ae7e238d6ee3e2630353dbe6c4a2b0f36e613
+      value: 22424703114646680e0b0227036c17415f573f38292d280f042d043feeaf332ae7e238d6ee3e2630353dbe721130082beb
       flags: 0
     vcSharedLogLevel:
       value: 0d5e400f0650