Exemplo n.º 1
0
    public void OnTimingChange()
    {
        if (!EnableValueChange)
        {
            return;
        }
        float TimingTmp;

        if (!float.TryParse(Time.text, out TimingTmp))
        {
            TimeImg.color = InvalidColor;
            return;
        }
        if (Mode == Lanotalium.Editor.TimeValuePairMode.ScrollSpeed)
        {
            if (!OperationManager.CheckScrollTimeValid(ScrollData, TimingTmp))
            {
                TimeImg.color = InvalidColor;
                return;
            }
            OperationManager.SetScrollTime(ScrollData, TimingTmp);
        }
        else if (Mode == Lanotalium.Editor.TimeValuePairMode.Bpm)
        {
            if (!OperationManager.CheckBpmTimeValid(BpmData, TimingTmp))
            {
                TimeImg.color = InvalidColor;
                return;
            }
            OperationManager.SetBpmTime(BpmData, TimingTmp);
        }
        TimeImg.color = ValidColor;
    }