Пример #1
0
        public void UpdateTiming()
        {
            inUse = 0;

            List <ArcTiming> timings = ArcTimingManager.Instance.Timings;

            foreach (var t in timings)
            {
                AdeTimingItem item = GetItemInstance();
                item.TimingReference        = t;
                item.Text                   = GetTimingString(t);
                item.RemoveBtn.interactable = timings.Count > 1;
            }

            CleanUnusedInstance();
            ArcTimingManager.Instance.OnTimingChange();
        }
        public void UpdateTiming()
        {
            inUse = 0;

            List <Dropdown.OptionData> options = new List <Dropdown.OptionData>();

            options.Add(new Dropdown.OptionData {
                text = "默认"
            });
            foreach (var tg in ArcTimingManager.Instance.timingGroups)
            {
                options.Add(new Dropdown.OptionData {
                    text = tg.Id.ToString()
                });
            }
            CurrentTimingGroupDropdown.options = options;

            CurrentTimingGroupDropdown.SetValueWithoutNotify(currentTimingGroup?.Id ?? 0);

            if (ArcGameplayManager.Instance.Chart == null)
            {
                CurrentTimingGroupDropdown.interactable = false;
                AddTimingGroupButton.interactable       = false;
                RemoveTimingGroupButton.interactable    = false;
            }
            else
            {
                CurrentTimingGroupDropdown.interactable = true;
                AddTimingGroupButton.interactable       = true;
                RemoveTimingGroupButton.interactable    = currentTimingGroup != null;
            }
            List <ArcTiming> timings = ArcTimingManager.Instance.GetTiming(currentTimingGroup);

            foreach (var t in timings)
            {
                AdeTimingItem item = GetItemInstance();
                item.TimingReference        = t;
                item.Text                   = GetTimingString(t);
                item.RemoveBtn.interactable = timings.Count > 1;
            }

            CleanUnusedInstance();
        }