// Update is called once per frame void Update() { if (!onStart) { BlinkLightIfLow(); } else if (onStart && controller.AmmoCount() != 0) { onStart = false; } }
// Update is called once per frame void Update() { if (!setInitial) { counterDigits.SetDoubleNumber(playerGunController.magazineSize); maxDigits.SetDoubleNumber(playerGunController.magazineSize); prevAmmoCount = 0; setInitial = true; } if (playerGunController.AmmoCount() != prevAmmoCount) { //ammoCountText.text = playerGunController.AmmoCount() + "/" + playerGunController.magazineSize; counterDigits.SetDoubleNumber(playerGunController.AmmoCount()); prevAmmoCount = playerGunController.AmmoCount(); } }