Exemplo n.º 1
0
    private void Update()
    {
        var sTime = ConfigUtils.ConvertTime(note.startTime);
        var eTime = ConfigUtils.ConvertTime(note.endTime);

        if (controller.CurrentSeconds() >= sTime && controller.CurrentSeconds() <= eTime)
        {
            this.GetComponent <TextMeshProUGUI>().fontStyle = FontStyles.Bold;
            this.GetComponent <TextMeshProUGUI>().color     = new Color32(255, 255, 255, 255);

            played = true;
        }
        else
        {
            this.GetComponent <TextMeshProUGUI>().fontStyle = FontStyles.Normal;
            this.GetComponent <TextMeshProUGUI>().color     = new Color32(147, 147, 147, 225);

            if (played == true)
            {
                controller.DestroyLast();
                played = false;
                controller.SubtractIndex();
                index = 3;
                controller.CreateSubtitle(2);
            }
        }
    }