Exemplo n.º 1
0
        public void Awake()
        {
            DataBindingSource dbs = GetComponent <DataBindingSource>();

            dbs.AddBinding("y",
                           () => settings.y,
                           (object val) => settings.y = Convert.ToSingle(val));
        }
Exemplo n.º 2
0
 private void BindResourceSetting(DataBindingSource bindingSource, string frequencyName, string abundanceName, ResourceSettings setting)
 {
     bindingSource.AddBinding(frequencyName, () => setting.Frequency, val => setting.Frequency = Convert.ToSingle(val));
     bindingSource.AddBinding(abundanceName, () => setting.Abundance, val => setting.Abundance = Convert.ToSingle(val));
 }