Added audio to textboxes

This commit is contained in:
Zoe J committed 2022-02-22 07:31:48 -06:00
1 parent 4c7900d435
commit 78ba552c47
16 files changed
+728 -59

No files matched your search

+3 -1
View File
@@ -7,6 +7,7 @@ public class Dialogue : MonoBehaviour
{
public TMP_Text textbox;
public TMP_Text arrow;
public AudioManager audioManager;
public List<string> pages = new List<string>();
int curPage = 0;
public bool isOpen = true;
@@ -22,7 +23,7 @@ public class Dialogue : MonoBehaviour
// Start is called before the first frame update
void Start()
{
if(pages.Count > 0)
if (pages.Count > 0)
{
textbox.text = pages[0];
arrow.text = "";
@@ -84,6 +85,7 @@ public class Dialogue : MonoBehaviour
++cCount;
textbox.text = pages[curPage].Substring(0, cCount);
elapsed = 0;
audioManager.Play("blip");
}
//skip ahead
if(Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.DownArrow) ||