private void ReadValues() { for (int i = 0; i < options.Length; i++) { Option option = options[i]; OptionPanelController panel = UIControl.optionPanelRel[option]; switch (option.myType) { case Option.OptionType.Slider: break; case Option.OptionType.Toggle: Option.Toggle toggle = option.myToggle; switch (option.name) { case "Game Mode": Debug.Log(option.name + toggle.defValue); toggle.defValue = GameManager.Instance.CurrenMode == GameManager.Mode.Rings; Debug.Log(option.name + toggle.defValue); panel.SetUIValue(toggle.defValue); break; } break; } } }
private void InitOptionsPanels() { foreach (Option option in OptionsManager.Instance.Options) { GameObject prefab; switch (option.myType) { case Option.OptionType.Slider: prefab = SliderOptionPrefab; break; case Option.OptionType.Toggle: prefab = ToggleOptionPrefab; break; default: prefab = null; break; } GameObject newPanel; newPanel = Instantiate(prefab, optionsUIParent); OptionPanelController control = newPanel.GetComponent <OptionPanelController>(); control.SetValues(option); optionPanelRel.Add(option, control); } }
public void LoadRafflegame() { OptionPanelController optioner = GameObject.Find("options_panel").GetComponent <OptionPanelController>(); Debug.Log("found optioner: " + optioner.ToString()); RaffleController raffler = gameObject.GetComponent <RaffleController>(); Debug.Log("found rafflecontroller: " + optioner.ToString()); raffler.LoadOptions(optioner); Application.LoadLevel(rafflename); }
public void LoadOptions(OptionPanelController input) { rowseats = input.optionrowseats; rownames = input.optionrownames; }