void _AssignColor(AssignUIColorEvent e)
 {
     ballColors   = e.colors;
     randomColors = new List <int>();
     for (int i = 0; i < ballColors.Length; i++)
     {
         randomColors.Add(i);
     }
     //Debug.Log(randomColors);
 }
Esempio n. 2
0
    void LoadBallMats()
    {
        ballMats = new Material[ballData.colors.Length];
        ballMats = LoadMaterials("BallMats");

        Color[] colors = new Color[ballMats.Length];
        for (int i = 0; i < ballMats.Length; i++)
        {
            colors[i] = ballMats[i].color;
        }

        AssignUIColorEvent e = new AssignUIColorEvent(colors);

        _EventBus.Publish <AssignUIColorEvent>(e);
    }