public void Show(string name, string role, bool hasRole, string[] roles, Die.SpecialColor specialColorType, ApplyCallback applyCallback, UserActionCallback userActionCallback) { _nameInput.text = name; _roleDropdown.options = roles.Select(str => new Dropdown.OptionData(str)).ToList(); _roleDropdown.value = System.Array.IndexOf(roles, role); _roleToggle.isOn = hasRole; _specialColorDropdown.value = (int)specialColorType; _doneCb = applyCallback; _userActionCb = userActionCallback; gameObject.SetActive(true); _nameInput.Select(); }
public void Reset() { name = null; @event = Die.AnimationEvent.None; @specialColorType = Die.SpecialColor.None; tracks.Clear(); var leds = new List <int>(); for (int i = 0; i < 20; ++i) { leds.Add(i); } tracks.Add(new Animations.EditTrack() { ledIndices = leds }); }