BORKED, SO BORKED
This commit is contained in:
+4730
-459
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Collections;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
@@ -22,6 +23,8 @@ public class LevelLoader : Singleton<LevelLoader>
|
|||||||
public JObject SpeechTree { private set; get; }
|
public JObject SpeechTree { private set; get; }
|
||||||
|
|
||||||
public string GlobalModifier { private set; get; }
|
public string GlobalModifier { private set; get; }
|
||||||
|
|
||||||
|
private string introdia;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@@ -124,16 +127,27 @@ public class LevelLoader : Singleton<LevelLoader>
|
|||||||
|
|
||||||
StatusManager.Instance.PopulatePanels();
|
StatusManager.Instance.PopulatePanels();
|
||||||
|
|
||||||
if (data.introdialog != null)
|
|
||||||
|
|
||||||
|
TutorialManager.Instance.ShowFirst();
|
||||||
|
|
||||||
|
introdia = data.introdialog;
|
||||||
|
|
||||||
|
StartCoroutine(DoSomethingAfterOneSecond());
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator DoSomethingAfterOneSecond()
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(0.1f);
|
||||||
|
|
||||||
|
if (introdia != null)
|
||||||
{
|
{
|
||||||
SpeechManager.Instance.StartText(new[]
|
SpeechManager.Instance.StartText(new[]
|
||||||
{
|
{
|
||||||
new KeyValuePair<string, string>(data.introdialog, "GUARD")
|
new KeyValuePair<string, string>(introdia, "GUARD")
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TutorialManager.Instance.ShowFirst();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class SpeechManager : Singleton<SpeechManager>
|
|||||||
otherPanel = transform.FindChildRecursive("OTHERPANEL").gameObject;
|
otherPanel = transform.FindChildRecursive("OTHERPANEL").gameObject;
|
||||||
|
|
||||||
mainText = transform.FindChildRecursive("TEXTPANEL").GetComponentInChildren<TextMeshProUGUI>();
|
mainText = transform.FindChildRecursive("TEXTPANEL").GetComponentInChildren<TextMeshProUGUI>();
|
||||||
|
Debug.LogWarning(mainText);
|
||||||
gameObject.SetActive(false);
|
gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,6 +85,11 @@ public class SpeechManager : Singleton<SpeechManager>
|
|||||||
|
|
||||||
private void NextText()
|
private void NextText()
|
||||||
{
|
{
|
||||||
|
playerPanel = transform.FindChildRecursive("PLAYERPANEL").gameObject;
|
||||||
|
otherPanel = transform.FindChildRecursive("OTHERPANEL").gameObject;
|
||||||
|
|
||||||
|
mainText = transform.FindChildRecursive("TEXTPANEL").GetComponentInChildren<TextMeshProUGUI>();
|
||||||
|
|
||||||
var item = textBuffer.Dequeue();
|
var item = textBuffer.Dequeue();
|
||||||
speaker = item.Value;
|
speaker = item.Value;
|
||||||
if (LevelLoader.Instance.GlobalModifier == "HORSE" && speaker == "GUARD")
|
if (LevelLoader.Instance.GlobalModifier == "HORSE" && speaker == "GUARD")
|
||||||
|
|||||||
Reference in New Issue
Block a user