void Step()
 {
     if (current != null)
     {
         current.Deactivate();
     }
     current = groups[index % groups.Count];
     current.Activate();
     index++;
 }
Пример #2
0
 public void OnMenuChanged(int option)
 {
     if (cur != null)
     {
         cur.Deactivate();
     }
     if (option < groups.Count)
     {
         cur = groups[option];
         cur.Activate();
     }
 }
Пример #3
0
        void Start()
        {
            if (groups.Count > 0)
            {
                cur = groups.First();
                cur.Activate();
            }

            menu.AddOptions(groups.Select(group => {
                var option  = new Dropdown.OptionData();
                option.text = group.name;
                return(option);
            }).ToList());
        }