Esempio n. 1
0
    void QuerySetFretPanelObjectsStringColor()
    {
        ColorSet cs = NeckNoteColors[CurrentStyle];
        Color    c1 = cs.ColorAux1;
        Color    c2 = cs.ColorAux2;
        Color    c3 = cs.ColorAux3;

        foreach (GameObject tObj in FretPanelObjectList)
        {
            FretPanelObj objectScript = tObj.GetComponent <FretPanelObj> ();
            objectScript.SetStringColors(c1, c2);
            objectScript.SetObjectColor(c3);
        }
    }
Esempio n. 2
0
    void QuerySetFretPanelObjectsPosition()
    {
        float yOffset   = 0f;
        int   fretIndex = 0;

        int[] fretArray = new int[26] {
            0, -1, -1, 3, -1, 5, -1, 7, -1, 9, -1, -1, 12, -1, -1, 15, -1, 17, -1, 19, -1, 21, -1, -1, 24, -1
        };


        foreach (GameObject tObj in FretPanelObjectList)
        {
            FretPanelObj objectScript = tObj.GetComponent <FretPanelObj> ();

            float x = fretStartX;
            float y = fretStartY + yOffset;
            objectScript.SetGridPosition(new Vector3(x, y, 1f));


            int f = fretArray [fretIndex];
            if (f > -1)
            {
                if (f == 0)
                {
                    objectScript.SetFretLabel("Open", 3);
                }
                else
                {
                    objectScript.SetFretLabel(f.ToString());
                }
            }
            else
            {
                objectScript.SetFretLabel(" ");
            }

            if (fretIndex == 0)
            {
                objectScript.SetObjectColor(32, 64, 128, 255);
            }

            yOffset += FretGridDY * targetScale;

            fretIndex++;
        }
    }