Esempio n. 1
0
    void QueryApplyNoteToOn(int note, int interval)
    {
        //Debug.LogError ("QueryApplyNoteToOn note = " + note);

        foreach (GameObject tObj in MarkerObjectList)
        {
            MarkerObj objectScript = tObj.GetComponent <MarkerObj> ();

            int noteIndex = objectScript.NoteName;

            if (noteIndex == note)
            {
                objectScript.SetVisibleStatus(true);

                //select color styles
                ColorSet cs = NeckNoteColors[CurrentStyle];
                Color    c  = GetColorFromSet(cs, interval);
                objectScript.SetObjectColor(c.r * 255f, c.g * 255f, c.b * 255f, c.a * 255f);
                objectScript.SetSpriteToUse(0);

                int colorCode = cs.GetColorCode(0);
                if (colorCode == 1)
                {
                    if (interval == 0)
                    {
                        objectScript.SetSpriteToUse(1);
                    }
                    else if (interval == 7)
                    {
                        objectScript.SetSpriteToUse(2);
                    }
                    else
                    {
                        objectScript.SetSpriteToUse(0);
                    }
                }

                //select note display style
                string noteText = FormData.Instance.gKeyNamesSharp[noteIndex];
                if (NoteDisplayStyle == 1)
                {
                    noteText = FormData.Instance.gKeyNamesFlat[noteIndex];
                }
                else if (NoteDisplayStyle == 2)
                {
                    noteText = FormData.Instance.gIntervalText[interval];
                }
                else if (NoteDisplayStyle == 3)
                {
                    noteText = FormData.Instance.gIntervalExtendedText[interval];
                }

                c = GetColorFromSet(cs, 12);
                objectScript.SetMarkerLabel(noteText, c);
            }
        }
    }
Esempio n. 2
0
    void QuerySetObjectsResetColor()
    {
        QuerySetFretPanelObjectsStringColor();

        foreach (GameObject tObj in MarkerObjectList)
        {
            MarkerObj objectScript = tObj.GetComponent <MarkerObj> ();
            objectScript.SetVisibleStatus(false);
            objectScript.SetObjectColor(255, 255, 255, 0);
        }
    }