private void resetDieNumberLocations() { for (int index = 3; index < 7; index++) { string childName = string.Format("rollButton{0}", index); GameObject dobject = this.transform.FindChild(childName).gameObject; DieRollNumber droll = dobject.GetComponent <DieRollNumber> (); droll.transform.localPosition = new Vector2(droll.homeX, droll.homeY); } }
public void selectNumberOfDice(int number) { numberDiceRolled = number; // send dice home, up to number of selected dice resetDieLocations(numberDiceRolled); resetNumberOfRollsRemaining(); // hide the selection buttons for (int index = 3; index < 7; index++) { string childName = string.Format("rollButton{0}", index); GameObject dobject = this.transform.FindChild(childName).gameObject; DieRollNumber droll = dobject.GetComponent <DieRollNumber> (); droll.transform.position = new Vector2(300, 300); } checkShowProcessButton(); }