void Update() { completed = true; if (NumberOfSheets.GetComponent <Text>().text != UniqueLevel.NumberOfSheets.ToString()) { completed = false; } if (SheetThickness.GetComponentInChildren <Text>().text != UniqueLevel.sheetThckness.ToString()) { completed = false; } if (!GetComponent <BlanketControl>().AllBlanketHasSheet()) { completed = false; } if (completed && !visitedOnce) { visitedOnce = true; Run.GetComponent <OperationsButtons>().RunIsClicked(); //quitButton.SetActive(true); Status.SetActive(true); Status.GetComponent <Text>().text = "Quest Complete!!!"; Debug.Log("Success"); } }
public bool VerifyValues() { string s1 = SheetThickness.GetComponentInChildren <Text>().text; string s2 = SheetCount.GetComponentInChildren <Text>().text; double n1; int n2; try { n1 = Convert.ToDouble(s1); n2 = Convert.ToInt32(s2); } catch { return(false); } if (n1 < 0.04 || n1 > 0.6) { return(false); } return(true); }