Exemplo n.º 1
0
    // This method assigns proper color and histogram height according to ball draw proability
    public void setPickNumbersDisplay()
    {
        List <float>   h      = Stats.getScaledStats();
        List <Vector3> autumn = MyTools.Colorgrade();

        for (int i = 0; i < h.Count; i++)
        {
            //Debug.Log (i.ToString () + " :: " + h [i]);
            Vector3 tmpv  = MyTools.getColor(100f * h[i], autumn);
            Color   tmp   = new Color(tmpv.x, tmpv.y, tmpv.z);
            Color   bckgr = new Color(0.956f, 0.874f, 0.294f);           //new Color (0.03f, 0.01f, 0.06f);
            ButtonList[i].GetComponent <Renderer> ().material.SetColor("_BckGrndColor", bckgr);
            ButtonList[i].GetComponent <Renderer> ().material.SetColor("_CircleColor", tmp);
            ButtonList[i].GetComponent <Renderer> ().material.SetColor("_TextColor", Color.black);
            //ButtonList [i].GetComponent<Renderer> ().material.SetFloat ("_EmmitValue", 0f);
            if (ButtonList [i].GetComponent <buttonNumberScript> ().IsSelected())
            {
                ButtonList [i].GetComponent <buttonNumberScript> ().toggleSelection();
            }
            //Histogram [i].GetComponent<histbarScript> ().setHeight (h [i]);
        }
    }