private void RoundStart() { if (round == 1) { ButtonA.GetComponentInChildren <TextMeshProUGUI>().text = "Red"; ButtonB.GetComponentInChildren <TextMeshProUGUI>().text = "Black"; } else if (round == 2) { ButtonA.GetComponentInChildren <TextMeshProUGUI>().text = "High"; ButtonB.GetComponentInChildren <TextMeshProUGUI>().text = "Low"; } else if (round == 3) { ButtonA.GetComponentInChildren <TextMeshProUGUI>().text = "Outside"; ButtonB.GetComponentInChildren <TextMeshProUGUI>().text = "Inbetween"; } else if (round == 4) { ExtraButtons.SetActive(true); ButtonA.GetComponentInChildren <TextMeshProUGUI>().text = "Clover"; ButtonB.GetComponentInChildren <TextMeshProUGUI>().text = "Diamond"; ButtonC.GetComponentInChildren <TextMeshProUGUI>().text = "Spade"; ButtonD.GetComponentInChildren <TextMeshProUGUI>().text = "Heart"; } }
// Start is called before the first frame update void Start() { A = GameObject.Find("A"); ButtonA = A.GetComponent <Button>(); B = GameObject.Find("B"); ButtonB = B.GetComponent <Button>(); C = GameObject.Find("C"); ButtonC = C.GetComponent <Button>(); D = GameObject.Find("D"); ButtonD = D.GetComponent <Button>(); head = this.transform.GetChild(0).gameObject; text = this.transform.GetChild(1).gameObject; meshH = head.GetComponent <TextMeshProUGUI>(); mesh = text.GetComponent <TextMeshProUGUI>(); mesh.text = "Question 1) What is the first step in sending data through a UDP connection for the CLIENT?"; ButtonA.GetComponentInChildren <Text>().text = "Close the socket"; ButtonB.GetComponentInChildren <Text>().text = "Receive the data"; ButtonC.GetComponentInChildren <Text>().text = "Bind the socket"; ButtonD.GetComponentInChildren <Text>().text = "Create a socket"; }