private void DoAddThing() { TextChoices.Add(NewThingText); RotatedThing = NewThingText; NewThingText = null; Navigation.PopAsync(true); }
// Use this for initialization void Start() { string path = "Assets/JSON/story.json"; string contents = File.ReadAllText(path); textValues = JsonUtility.FromJson <TextChoices>(contents); GameObject textShop = GameObject.FindGameObjectWithTag("TextShop"); mChoice1 = GameObject.FindGameObjectWithTag("Choice1"); mChoice2 = GameObject.FindGameObjectWithTag("Choice2"); mChoice3 = GameObject.FindGameObjectWithTag("Choice3"); mChoice1.SetActive(false); mChoice2.SetActive(false); mChoice3.SetActive(false); typeWritterEffect = (TypeWritterEffect)textShop.GetComponent(typeof(TypeWritterEffect)); if (textValues != null) { for (int i = 0; i < textValues.story_line.Capacity; i++) { //print(textValues.story_line[i].id + ", " + textValues.story_line[i].text); } } setVisibility(); }