void Start() { airconditionInfo.GetComponent <DisplayText>().textObject.transform.parent.gameObject.SetActive(false); step = 0; openObjects = 6; validators = GameObject.Find("/Interactables/Validators"); inConSnaps = GameObject.Find("/InConSnaps"); outConSnaps = GameObject.Find("/OutConSnaps"); generateJsonInfo = GameObject.Find("/JsonLogic").GetComponent <GenerateJsonInfo>(); informationText = generateJsonInfo.GetSceneInfoList("ventilationSteps"); segmentScores = new List <int>(); ButtonPress(); }
public void login() { // database path // checking if user is valid if (checkUser("URI=file://" + filePath, username, password, seat) == true) { // display successful login message DisplayText.GetComponent <Text>().text = "Login Successul"; // Update Seat Information if (seat == "Seat 1") { if (checkSeat("URI=file://" + filePath, "1") == false) { markSeat("URI=file://" + filePath, "1"); // load classroom SceneManager.LoadScene("Classroom"); } else { DisplayText.GetComponent <Text> ().text = "Seat Taken"; } } else if (seat == "Seat 2") { if (checkSeat("URI=file://" + filePath, "2") == false) { markSeat("URI=file://" + filePath, "2"); // load classroom SceneManager.LoadScene("Classroom"); } else { DisplayText.GetComponent <Text> ().text = "Seat Taken"; } } else { // load classroom SceneManager.LoadScene("Classroom"); } } else { DisplayText.GetComponent <Text>().text = "Invalid Username or Password"; } }