// Update is called once per frame void Update() { // resetScript r = this.GetComponent<resetScript>(); VRTK_Lever l = child.GetComponent <VRTK_Lever>(); VRTK_Lever aud = auditory.GetComponent <VRTK_Lever>(); VRTK_Lever vis = visual.GetComponent <VRTK_Lever>(); VRTK_Lever sos = ss.GetComponent <VRTK_Lever>(); VRTK_Lever gus = gustatory.GetComponent <VRTK_Lever>(); textParse txt = parent.GetComponent <textParse>(); List <string> arr = new List <string>(); if (aud.CalculateValue() > 45 && trig == false) { List <string> arrr = txt.auditory(); for (int i = 0; i < arrr.Count; i++) { arr.Add(arrr[i]); } } if (vis.CalculateValue() > 45 && trig == false) { List <string> arrr = txt.visual(); for (int i = 0; i < arrr.Count; i++) { arr.Add(arrr[i]); } } if (sos.CalculateValue() > 45 && trig == false) { List <string> arrr = txt.somatosensory(); for (int i = 0; i < arrr.Count; i++) { arr.Add(arrr[i]); } } if (gus.CalculateValue() > 45 && trig == false) { List <string> arrr = txt.gustatory(); for (int i = 0; i < arrr.Count; i++) { arr.Add(arrr[i]); } } // List<string> arr = txt.parse(); //float angle = lev. if (l.CalculateValue() > 45 && trig == false) { trig = true; transformation(arr); for (int i = 0; i < arr.Count; i++) { // print(arr[i]); } } if (l.CalculateValue() < 10 && trig == true) { trig = false; reset(arr); } }
// Update is called once per frame void Update() { // resetScript r = this.GetComponent<resetScript>(); VRTK_Lever l = child.GetComponent <VRTK_Lever>(); VRTK_Lever aud = auditory.GetComponent <VRTK_Lever>(); VRTK_Lever vis = visual.GetComponent <VRTK_Lever>(); VRTK_Lever sos = ss.GetComponent <VRTK_Lever>(); VRTK_Lever gus = gustatory.GetComponent <VRTK_Lever>(); textParse txt = parent.GetComponent <textParse>(); List <string> arr = new List <string>(); bool audActive = false; bool visActive = false; bool sosActive = false; bool gusActive = false; if (vis.CalculateValue() > 45 /*/ && trig == false/*/) { visActive = true; print("vis"); List <string> arrr = txt.visual(); for (int i = 0; i < arrr.Count; i++) { arr.Add(arrr[i]); } } if (aud.CalculateValue() > 45 /*/ && trig == false/*/) { audActive = true; print("aud"); List <string> arrr = txt.auditory(); for (int i = 0; i < arrr.Count; i++) { arr.Add(arrr[i]); } } if (sos.CalculateValue() > 45 /*/ && trig == false/*/) { sosActive = true; List <string> arrr = txt.somatosensory(); for (int i = 0; i < arrr.Count; i++) { arr.Add(arrr[i]); } } if (gus.CalculateValue() > 45 /*/ && trig == false/*/) { gusActive = true; List <string> arrr = txt.gustatory(); for (int i = 0; i < arrr.Count; i++) { arr.Add(arrr[i]); } } transformation(arr); if (!gusActive && !visActive && !sosActive && !audActive) { reset(arr); } // List<string> arr = txt.parse(); //float angle = lev. /*/ * if (l.CalculateValue() > 45 && trig == false) * { * trig = true; * transformation(arr); * for(int i = 0; i<arr.Count; i++) * { * // print(arr[i]); * } * } * if (l.CalculateValue()<10 && trig == true) * { * trig = false; * reset(arr); * } * /*/ }