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"; }
void Start() { m_ButtonScriptA = m_Button_A.GetComponent <ButtonA>(); m_ButtonScriptB = m_Button_B.GetComponent <ButtonB>(); m_ButtonScriptC = m_Button_C.GetComponent <ButtonC>(); m_ButtonScriptD = m_Button_D.GetComponent <ButtonD>(); m_ButtonScriptE = m_Button_E.GetComponent <ButtonE>(); m_ButtonScriptF = m_Button_F.GetComponent <ButtonF>(); }
public ConverterDigits() { TBLayout.SuspendLayout(); Controls.Add(TBLayout); Controls.Add(TextArea); Controls.Add(TextLine); Name = "ConverterDigits"; Button7.AddColor1(); Button7.Click += new EventHandler(InsertText); Button8.AddColor1(); Button8.Click += new EventHandler(InsertText); Button9.AddColor1(); Button9.Click += new EventHandler(InsertText); ButtonBackspace.AddColor1(); ButtonBackspace.Click += new EventHandler(Backspace); ButtonC.AddColor1(); ButtonC.Click += new EventHandler(InsertText); ButtonD.AddColor1(); ButtonD.Click += new EventHandler(InsertText); ButtonDelete.AddColor1(); ButtonDelete.Click += new EventHandler(Delete); ButtonEnter.AddColor1(); ButtonEnter.Click += new EventHandler(GetAnswer); ButtonI.AddColor1(); ButtonI.Click += new EventHandler(InsertText); ButtonL.AddColor1(); ButtonL.Click += new EventHandler(InsertText); ButtonM.AddColor1(); ButtonM.Click += new EventHandler(InsertText); ButtonV.AddColor1(); ButtonV.Click += new EventHandler(InsertText); ButtonX.AddColor1(); ButtonX.Click += new EventHandler(InsertText); Button0.AddColor1(); Button0.Click += new EventHandler(InsertText); Button1.AddColor1(); Button1.Click += new EventHandler(InsertText); Button2.AddColor1(); Button2.Click += new EventHandler(InsertText); Button3.AddColor1(); Button3.Click += new EventHandler(InsertText); Button4.AddColor1(); Button4.Click += new EventHandler(InsertText); Button5.AddColor1(); Button5.Click += new EventHandler(InsertText); Button6.AddColor1(); Button6.Click += new EventHandler(InsertText); TextArea.AddColor1(); TextLine.AddColor1(); TBLayout.Controls.AddRange(new Control[] { Button7, Button8, Button9, ButtonD, ButtonEnter, Button4, Button5, Button6, ButtonC, ButtonBackspace, Button1, Button2, Button3, ButtonL, ButtonDelete, Button0, ButtonI, ButtonV, ButtonX, ButtonM }); ResumeLayout(false); PerformLayout(); TBLayout.ResumeLayout(false); }