public void setConfigVar(ConfigBoolean boolean) { this.boolean = boolean; this.boolean.onValueChanged += () => { this.toggle.isOn = this.boolean.value; }; }
public ConfigBoolean CreateBoolean(string name, bool value = false) { ConfigBoolean v = new ConfigBoolean(name, value); this.store.putVar(v); return(v); }
public GameObject GenerateBoolean(ConfigBoolean b) { GameObject n = Instantiate(prefabBoolean); n.transform.SetParent(this.varUIContainer, false); UIBoolean ui = n.GetComponent <UIBoolean>(); ui.setConfigVar(b); n.SetActive(true); return(n); }