Пример #1
0
 public void setConfigVar(ConfigNumber number)
 {
     this.number = number;
     this.number.onValueChanged += () => {
         this.input.text = this.number.value + "";
     };
 }
Пример #2
0
        public ConfigNumber CreateNumber(string name, float value = 0)
        {
            ConfigNumber n = new ConfigNumber(name, value).SetPrecision(2);

            this.store.putVar(n);
            return(n);
        }
Пример #3
0
        public ConfigNumber CreateNumber(string name, int value = 0)
        {
            ConfigNumber n = new ConfigNumber(name, value);

            this.store.putVar(n);
            return(n);
        }
Пример #4
0
        public GameObject GenerateSlider(ConfigNumber f)
        {
            GameObject n = Instantiate(prefabSlider);

            n.transform.SetParent(this.varUIContainer, false);
            UIRange ui = n.GetComponent <UIRange>();

            ui.setConfigVar(f);
            n.SetActive(true);
            return(n);
        }