Example #1
0
 public void UpdateUI()
 {
     playerUIController.SetManna(stats.MaxManna, stats.manna);
     playerUIController.SetHp(stats.MaxHealth, stats.health);
     playerUIController.SetMedicineCount(Inventory.MedicineChestCount);
     playerUIController.SetBullet(Inventory.Ammo);
     playerUIController.SetMoney(CarInventory.MoneyCount);
     playerUIController.SetMutagenCount(CarInventory.MutagenCount);
     playerUIController.SetSanorinCount(CarInventory.SanorinCount);
 }
Example #2
0
 public void OnValueChBullets()
 {
     if (CurrentPlayer.Inventory.Ammo == CurrentPlayer.Inventory.MaxAmmo && BulletsSlider.value > lastValueBullet)
     {
         BulletsSlider.value = lastValueBullet;
     }
     if (BulletsSlider.value > CurrentPlayer.Inventory.MaxAmmo)
     {
         BulletsSlider.value = CurrentPlayer.Inventory.MaxAmmo;
     }
     CurrentPlayer.Inventory.Ammo += (int)BulletsSlider.value - lastValueBullet;
     BulletsCount               += lastValueBullet - (int)BulletsSlider.value;
     TextPlayerBullets.text      = $"{CurrentPlayer.Inventory.Ammo}";
     TextInInventoryBullets.text = $"{BulletsCount}";
     lastValueBullet             = (int)BulletsSlider.value;
     playerUIController.SetBullet((int)CurrentPlayer.Inventory.Ammo);
 }