public void HideButtons() { for (int i = 0; i < NUM_BUTTONS; i++) { AttackButtonScript s = Buttons[i].GetComponent <AttackButtonScript>(); if (s) { Buttons[i].GetComponent <AttackButtonScript>().Hide(); } } }
// Use this for initialization void Start() { myButton = GetComponentInParent <AttackButtonScript>(); Debug.Log(myButton.gameObject.name); GetComponentInChildren <Text>().text = myButton.attackerChoice.damage + " - " + myButton.attackerChoice.strikes + " " + myButton.response.damage + " - " + myButton.response.strikes + "\n" + myButton.attackerChoice.damType + " " + myButton.response.damType; }