// Update is called once per frame void Update() { if (GameManager.isPlaying()) { my_shoulder.Update(Time.deltaTime); my_elbow_up.Update(Time.deltaTime); my_elbow_down.Update(Time.deltaTime); my_shoulder.SetControlFeeling(alcohol_stamina, MAX_ALCOHOL_STAMINA); my_elbow_up.SetControlFeeling(alcohol_stamina, MAX_ALCOHOL_STAMINA); my_elbow_down.SetControlFeeling(alcohol_stamina, MAX_ALCOHOL_STAMINA); if (mouth.GetDrinkedGlass()) { last_glass_class = mouth.GetLastGlass(); drinked_glasses++; switch (last_glass_class.my_shot) { case kind_shot.sake: alcohol_stamina += 30 * (1 - sake); break; case kind_shot.absenta: alcohol_stamina += 30 * (1 - absenta); break; case kind_shot.vodka: alcohol_stamina += 30 * (1 - vodka); break; case kind_shot.whisky: alcohol_stamina += 30 * (1 - whisky); break; case kind_shot.wine: alcohol_stamina += 30 * (1 - wine); break; default: alcohol_stamina += 30; break; } } ; alcohol_stamina = alcohol_stamina - 0.05 < 0 ? 0 : alcohol_stamina - 0.05F; if (alcohol_stamina >= MAX_ALCOHOL_STAMINA) { GameManager.OnGameEnds(GameManager.CheckWinner()); } barraBorracho.fillAmount = (alcohol_stamina / MAX_ALCOHOL_STAMINA); } pointText.text = drinked_glasses.ToString(); }