public void setState(int monNum, float speed, int hp, int resist, characteristic cha) { print(monNum); moveSpeed = speed; this.hp = hp; nowHp = hp; monCha = cha; this.resist = resist; GetComponent <Image>().sprite = monImage[monNum]; }
private void bAddCharacteristic_Click(object sender, RoutedEventArgs e) {//обработчик кнопки добавить Windows.characteristicWindow chw = new characteristicWindow(); chw.ShowDialog(); if (chw.DialogResult == true) //если пользователь ввел значение { //создаем объект, заполняем и добавляем в модель бд characteristic newCharacteristic = new characteristic(); newCharacteristic.name = chw.CharacteristicName; newCharacteristic.unit = chw.Unit; core.serviceCenterDB.characteristics.Add(newCharacteristic); core.serviceCenterDB.SaveChanges(); updateCbCharacteristics(); } }