// Use this for initialization void Start() { currentObj = gameObject; gameViewer = currentObj.transform.gameObject; mixCheckOrder = GameObject.Find("Mixsolution").GetComponent <CheckOrder> (); call = GameObject.Find("GameObject").GetComponent <LoadClassroom> (); }
// Use this for initialization public void callHeatReaction() { // LoadClassroom.getmixElementB (); call = GameObject.Find("GameObject").GetComponent <LoadClassroom>(); //heatReaction =GameObject.FindGameObjectWithTag("heatReaction"); print("Heat Reaction is : " + call.getheatReaction()); handleHeatReaction(); }
// Use this for initialization public void callB() { // LoadClassroom.getmixElementB (); call = GameObject.Find("GameObject").GetComponent <LoadClassroom>(); testtubeBSolution = GameObject.Find("test-tube_solutionB"); elementBText = GameObject.Find("ElementB_text").GetComponent <Text> (); rend = testtubeBSolution.GetComponent <Renderer>(); rend.enabled = true; print("B is : " + call.getmixElementB()); handleElementB(); }
// Use this for initialization public void callHeat() { // LoadClassroom.getmixElementB (); call = GameObject.Find("GameObject").GetComponent <LoadClassroom>(); heatSolution = GameObject.Find("heat-solution"); heatElementText = GameObject.FindGameObjectWithTag("heatElementText").GetComponent <Text> (); rend = heatSolution.GetComponent <Renderer>(); rend.enabled = true; print("Heat E is : " + call.getheatElement1()); handleHeatElement(); }
// Use this for initialization public void callA() { // LoadClassroom.GetmixElementA (); call = GameObject.Find("GameObject").GetComponent <LoadClassroom>(); testtubeASolution = GameObject.Find("test-tube_solutionA"); elementAText = GameObject.Find("ElementA_text").GetComponent <Text> (); rend = testtubeASolution.GetComponent <Renderer>(); rend.enabled = true; print("hello"); handleElementA(); }
// Update is called once per frame void Update() { checkOrder = GameObject.Find("Mixsolution").GetComponent <CheckOrder> (); call = GameObject.Find("GameObject").GetComponent <LoadClassroom>(); elementOrder = checkOrder.getMixOrder(); if (elementOrder [0] == call.getmixElementA() && elementOrder [1] == call.getmixElementB()) { handleMixReaction(); checkOrder.setEmpty(); } else if (elementOrder [0] == call.getmixElementB() && elementOrder [1] == call.getmixElementA()) { handleMixReverseReaction(); checkOrder.setEmpty(); } }
IEnumerator loadJSON() { string URL2 = "http://mrfrankiekklee.pythonanywhere.com/checkVerificationCode/"; codeInput = GameObject.Find("InputField").GetComponent <InputField> (); www = new WWW(URL2 + codeInput.text); yield return(www); loadclassroom = GameObject.Find("LoadClassroom").GetComponent <LoadClassroom> (); print(www.text); print(Application.persistentDataPath); File.WriteAllText(Application.persistentDataPath + "1.json", www.text); // AssetDatabase.ImportAsset ("Assets/Resources/1.json", ImportAssetOptions.Default); loadclassroom.LoadJson(); moveToClassroom(); }
public void HandleTimedInput() { if (currentObj.tag == "minusheat") { StartCoroutine(LerpLow()); isLowHeat = true; highHeatButton.setHighHeat(false); call = GameObject.Find("GameObject").GetComponent <LoadClassroom> (); if (call.getheatLevel() == "low") { getHeatReaction getHeatR = GameObject.Find("HeatReaction").GetComponent <getHeatReaction> (); getHeatR.callHeatReaction(); } else { print(" It is wrong!"); } } }
// Use this for initialization public void getHeat() { call = GameObject.Find("GameObject").GetComponent <LoadClassroom>(); print("Heat Level is:" + call.getheatLevel()); }
public void getOptionCText() { call = GameObject.Find("LoadClassroom").GetComponent <LoadClassroom> (); optionCText = this.GetComponent <Text>(); optionCText.text = call.getmicroscope3(); }