diff --git a/GGJ17/Assets/Prefab/Dialog/Dialog Left.prefab b/GGJ17/Assets/Prefab/Dialog/Dialog Left.prefab index bb981bc..2e0e0f9 100644 Binary files a/GGJ17/Assets/Prefab/Dialog/Dialog Left.prefab and b/GGJ17/Assets/Prefab/Dialog/Dialog Left.prefab differ diff --git a/GGJ17/Assets/Prefab/Dialog/Dialog Left.prefab.meta b/GGJ17/Assets/Prefab/Dialog/Dialog Left.prefab.meta index aac4150..29b8696 100644 --- a/GGJ17/Assets/Prefab/Dialog/Dialog Left.prefab.meta +++ b/GGJ17/Assets/Prefab/Dialog/Dialog Left.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 07c11a70a8018164ca777bfa04052c4f -timeCreated: 1485023801 +guid: 68681d1e82ea27d469ea9665ff7ac4b1 +timeCreated: 1485079683 licenseType: Free NativeFormatImporter: userData: diff --git a/GGJ17/Assets/Prefab/Dialog/Dialog Right.prefab b/GGJ17/Assets/Prefab/Dialog/Dialog Right.prefab index 84016b4..5fce198 100644 Binary files a/GGJ17/Assets/Prefab/Dialog/Dialog Right.prefab and b/GGJ17/Assets/Prefab/Dialog/Dialog Right.prefab differ diff --git a/GGJ17/Assets/Prefab/Dialog/Dialog Right.prefab.meta b/GGJ17/Assets/Prefab/Dialog/Dialog Right.prefab.meta index bdd96b0..9041da8 100644 --- a/GGJ17/Assets/Prefab/Dialog/Dialog Right.prefab.meta +++ b/GGJ17/Assets/Prefab/Dialog/Dialog Right.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: c43fa688a71d0cd4988e71c9075226a4 -timeCreated: 1485023976 +timeCreated: 1485079809 licenseType: Free NativeFormatImporter: userData: diff --git a/GGJ17/Assets/Prefab/Dialog/Dialog.prefab b/GGJ17/Assets/Prefab/Dialog/Dialog.prefab index 0cc49eb..13e08d4 100644 Binary files a/GGJ17/Assets/Prefab/Dialog/Dialog.prefab and b/GGJ17/Assets/Prefab/Dialog/Dialog.prefab differ diff --git a/GGJ17/Assets/Prefab/Dialog/Dialog.prefab.meta b/GGJ17/Assets/Prefab/Dialog/Dialog.prefab.meta index 30fb4f6..e87cecc 100644 --- a/GGJ17/Assets/Prefab/Dialog/Dialog.prefab.meta +++ b/GGJ17/Assets/Prefab/Dialog/Dialog.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: a8148190d06b1484bac1b82675ada2e2 -timeCreated: 1485045754 +timeCreated: 1485082671 licenseType: Free NativeFormatImporter: userData: diff --git a/GGJ17/Assets/Scene/IntroScene.unity b/GGJ17/Assets/Scene/IntroScene.unity index ac47402..8227efc 100644 Binary files a/GGJ17/Assets/Scene/IntroScene.unity and b/GGJ17/Assets/Scene/IntroScene.unity differ diff --git a/GGJ17/Assets/Script/Dialog/Dialog.cs b/GGJ17/Assets/Script/Dialog/Dialog.cs index acd8646..2384a40 100644 --- a/GGJ17/Assets/Script/Dialog/Dialog.cs +++ b/GGJ17/Assets/Script/Dialog/Dialog.cs @@ -47,7 +47,10 @@ public IEnumerator Talk() yield return StartCoroutine(MoveDialogBox(rect, new Vector3(rect.anchoredPosition.x, - -rect.rect.height / 2 - (i * rect.rect.height) - 14))); + -rect.rect.height / 2 - (i * rect.rect.height) - 30))); + + rect.anchoredPosition = new Vector3(rect.rect.width / 2 + 17, + -rect.rect.height / 2 - (i * rect.rect.height) - 30 - 15*i); DialogBox d = box.GetComponent(); d.text = speeches[i].text; @@ -64,6 +67,16 @@ public IEnumerator MoveDialogBox(RectTransform rect, Vector3 target) } } + public void Reset() + { + foreach(DialogBox d in FindObjectsOfType()) + { + Destroy(d.gameObject); + } + + speeches.Clear(); + } + internal void Clear() { speeches.Clear(); diff --git a/GGJ17/Assets/Script/IntroSequence.cs b/GGJ17/Assets/Script/IntroSequence.cs index b2bf181..c4e93a5 100644 --- a/GGJ17/Assets/Script/IntroSequence.cs +++ b/GGJ17/Assets/Script/IntroSequence.cs @@ -1,7 +1,8 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; - +using UnityEngine.SceneManagement; + public class IntroSequence : MonoBehaviour { @@ -50,5 +51,36 @@ public IEnumerator PlayIntro() d.speeches.Add(e); yield return StartCoroutine(d.Talk()); + + d.Reset(); + + e = new Dialog.DialogElement(); + e.dialogBox = d.dialogBoxes[1]; + e.text = "Mission control, we are now entering Psion's orbit."; + d.speeches.Add(e); + + e = new Dialog.DialogElement(); + e.dialogBox = d.dialogBoxes[1]; + e.text = "Mission control, please come in! We are just above Psion..... Do you copy?"; + d.speeches.Add(e); + + e = new Dialog.DialogElement(); + e.dialogBox = d.dialogBoxes[1]; + e.text = "They are not answering!"; + d.speeches.Add(e); + + e = new Dialog.DialogElement(); + e.dialogBox = d.dialogBoxes[1]; + e.text = "Check the main systems!"; + d.speeches.Add(e); + + e = new Dialog.DialogElement(); + e.dialogBox = d.dialogBoxes[1]; + e.text = "Whate the ...? Something has fried our computer! We are coming down hard. Brace for impact."; + d.speeches.Add(e); + + yield return StartCoroutine(d.Talk()); + + SceneManager.LoadScene(2, LoadSceneMode.Single); } } diff --git a/GGJ17/ProjectSettings/EditorBuildSettings.asset b/GGJ17/ProjectSettings/EditorBuildSettings.asset index be54585..21b6bfe 100644 Binary files a/GGJ17/ProjectSettings/EditorBuildSettings.asset and b/GGJ17/ProjectSettings/EditorBuildSettings.asset differ