Add simple audio system
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using DefaultNamespace;
|
||||
using JetBrains.Annotations;
|
||||
@@ -133,11 +134,11 @@ public class DialogManager : Singleton<DialogManager>
|
||||
|
||||
option.GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
|
||||
AudioManager.Instance.PlaySound("WordAdd");
|
||||
if (kvp.Value is JValue)
|
||||
{
|
||||
AddQuestionInfill(currentItem, kvp.Key + "?");
|
||||
Debug.LogError("ready");
|
||||
|
||||
currentItem = null;
|
||||
AskButton.SetActive(true);
|
||||
FullQuestion = kvp.Value.ToString();
|
||||
@@ -161,6 +162,7 @@ public class DialogManager : Singleton<DialogManager>
|
||||
|
||||
public void BackButtonPress()
|
||||
{
|
||||
AudioManager.Instance.PlaySound("WordRemove");
|
||||
if (questionStack.Count == 0)
|
||||
{
|
||||
reset();
|
||||
@@ -173,9 +175,9 @@ public class DialogManager : Singleton<DialogManager>
|
||||
Destroy(infil);
|
||||
|
||||
|
||||
//this might be buggy, or might miraculuisly work
|
||||
//if options start dissapearing randomly, look here
|
||||
if (item.StartsWith("NOREC_"))
|
||||
//aaaaaaaaaaaaaaaaaaaaaaaa
|
||||
//aaaaaaaaaaaaaaaaaaaaaaaa
|
||||
if (parent.ContainsKey(item) && parent[item] is JObject && (parent[item] as JObject).ContainsKey("QUESTION"))
|
||||
{
|
||||
recursiveDepth--;
|
||||
FullQuestionPrefixes.Pop();
|
||||
@@ -186,6 +188,7 @@ public class DialogManager : Singleton<DialogManager>
|
||||
|
||||
public void SubmitButtonPress()
|
||||
{
|
||||
AudioManager.Instance.PlaySound("Select");
|
||||
//formulate query string in format PERPSECTIVE%ITEM#PROPERTY
|
||||
//slightly wack way of doing it, hoping it is future proof
|
||||
while (FullQuestionPrefixes.Count > 0)
|
||||
|
||||
Reference in New Issue
Block a user