Esempio n. 1
0
    public void RandomizeValue(int max = -1)
    {
        buttonsShowing = GameObject.Find("ControlPanel").GetComponent <ButtonsOnScreen>();
        //Debug.Log("Buttons = "+ buttonsShowing.buttonsAnimated);

        if (max < 0)
        {
            max = (int)Mathf.Pow(2, buttonsShowing.buttonsAnimated);
            // Debug.Log("Max = " + max);
        }
        SetValue(Random.Range(0, max));
    }
Esempio n. 2
0
    void Start()
    {
        GameObject controlPanel = GameObject.Find("ControlPanel");

        buttonsShowing = controlPanel.GetComponent <ButtonsOnScreen>();
    }